diff --git a/apps/mobile/src/context/AuthContext.tsx b/apps/mobile/src/context/AuthContext.tsx index 4852a165..3f58de75 100644 --- a/apps/mobile/src/context/AuthContext.tsx +++ b/apps/mobile/src/context/AuthContext.tsx @@ -3,11 +3,14 @@ import AsyncStorage from '@react-native-async-storage/async-storage'; import { get } from '../services/api'; import { DEMO_TOKEN } from '../services/api'; +// ── Storage Keys ────────────────────────────────────────────────────────── + // ── Storage Keys ────────────────────────────────────────────────────────────── const TOKEN_KEY = 'devcard.auth.token'; const FIRST_LAUNCH_KEY = 'devcard.firstLaunch'; +// ── Types ──────────────────────────────────────────────────────────── // ── Types ───────────────────────────────────────────────────────────────────── interface User { @@ -36,6 +39,8 @@ interface AuthContextType { enterDemoMode: () => Promise; } +// ── Context ─────────────────────────────────────────────────────────── + // ── Context ─────────────────────────────────────────────────────────────────── const AuthContext = createContext(undefined); @@ -98,6 +103,9 @@ export function AuthProvider({ children }: { children: ReactNode }) { } }, []); + // ── Logout ── + + // ── Logout ── const logout = useCallback(async () => { @@ -110,6 +118,10 @@ export function AuthProvider({ children }: { children: ReactNode }) { } }, []); + // ── Refresh User ── + + + // ── Refresh User ── const refreshUser = useCallback(async () => { @@ -152,4 +164,4 @@ export function useAuth(): AuthContextType { throw new Error('useAuth must be used within an AuthProvider'); } return context; -} +} \ No newline at end of file