refactor: reorganize imports and improve error handling across components

This commit is contained in:
Wikid82
2025-11-20 22:21:32 -05:00
parent 9f62a4a2df
commit 62904858b2
23 changed files with 271 additions and 169 deletions

View File

@@ -0,0 +1,16 @@
import { createContext } from 'react';
export interface User {
user_id: number;
role: string;
}
export interface AuthContextType {
user: User | null;
login: () => Promise<void>;
logout: () => void;
isAuthenticated: boolean;
isLoading: boolean;
}
export const AuthContext = createContext<AuthContextType | undefined>(undefined);