feat: login provider selection, logout, playlists pages
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 22s

- LoginPage : sélection Discord/GitHub/Google/Twitch via SuperOAuth
- Header : bouton Connexion → /login, logout ↩ quand connecté, nav Playlists conditionnelle
- useAuth : expose setUser pour logout côté Layout
- PlaylistsPage : liste owned/shared, création inline
- PlaylistPage : détail playlist + liste vidéos ordonnées
- Fix : Video.id number → string (UUID)
- Routes : /login, /playlists, /playlists/:id
This commit is contained in:
2026-03-14 09:32:45 +01:00
parent fcd9867670
commit 4265d21c8b
8 changed files with 331 additions and 28 deletions

View File

@@ -2,8 +2,8 @@ import { useState, useEffect } from 'react';
import { apiFetch } from '../lib/api';
export interface User {
id: number;
email: string;
id: string;
email: string | null;
nickname: string;
subscriptionLevel?: number;
}
@@ -11,6 +11,7 @@ export interface User {
interface AuthState {
user: User | null;
loading: boolean;
setUser: (u: User | null) => void;
}
interface MeResponse {
@@ -33,5 +34,5 @@ export function useAuth(): AuthState {
return () => { cancelled = true; };
}, []);
return { user, loading };
return { user, loading, setUser };
}