diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-11-08 17:06:23 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-11-08 17:06:23 +0900 |
| commit | 6dbc5bbcacf99e4941ee8e1fb67bd132d0f517ed (patch) | |
| tree | 896f704c87e3187772543b5355ac140f8450e966 | |
| parent | eae659cbd0a46dd80e190590116e649d832353d8 (diff) | |
| download | feedaka-6dbc5bbcacf99e4941ee8e1fb67bd132d0f517ed.tar.gz feedaka-6dbc5bbcacf99e4941ee8e1fb67bd132d0f517ed.tar.zst feedaka-6dbc5bbcacf99e4941ee8e1fb67bd132d0f517ed.zip | |
refactor(frontend): Remove unused AuthContext.error
| -rw-r--r-- | frontend/src/contexts/AuthContext.tsx | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/frontend/src/contexts/AuthContext.tsx b/frontend/src/contexts/AuthContext.tsx index 8505be2..761cc0f 100644 --- a/frontend/src/contexts/AuthContext.tsx +++ b/frontend/src/contexts/AuthContext.tsx @@ -11,7 +11,6 @@ type LoginResult = { success: true } | { success: false; error: string }; interface AuthContextType { isLoggedIn: boolean; isLoading: boolean; - error: string | null; login: (username: string, password: string) => Promise<LoginResult>; logout: () => Promise<void>; } @@ -27,7 +26,6 @@ export function AuthProvider({ children }: { children: ReactNode }) { const isLoggedIn = !!currentUserResult.data?.currentUser; const isLoading = currentUserResult.fetching; - const error = currentUserResult.error?.message ?? null; const login = async ( username: string, @@ -65,9 +63,7 @@ export function AuthProvider({ children }: { children: ReactNode }) { }; return ( - <AuthContext.Provider - value={{ isLoggedIn, isLoading, error, login, logout }} - > + <AuthContext.Provider value={{ isLoggedIn, isLoading, login, logout }}> {children} </AuthContext.Provider> ); |
