From eae659cbd0a46dd80e190590116e649d832353d8 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sat, 8 Nov 2025 17:03:19 +0900
Subject: refactor(frontend): Remove unnecessary GraphQL query call

---
 frontend/src/contexts/AuthContext.tsx | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

(limited to 'frontend/src/contexts/AuthContext.tsx')

diff --git a/frontend/src/contexts/AuthContext.tsx b/frontend/src/contexts/AuthContext.tsx
index 9b53aa7..8505be2 100644
--- a/frontend/src/contexts/AuthContext.tsx
+++ b/frontend/src/contexts/AuthContext.tsx
@@ -21,7 +21,7 @@ const AuthContext = createContext<AuthContextType | undefined>(undefined);
 export function AuthProvider({ children }: { children: ReactNode }) {
 	const [, executeLogin] = useMutation(LoginDocument);
 	const [, executeLogout] = useMutation(LogoutDocument);
-	const [currentUserResult, reexecuteCurrentUser] = useQuery({
+	const [currentUserResult] = useQuery({
 		query: GetCurrentUserDocument,
 	});
 
@@ -43,8 +43,6 @@ export function AuthProvider({ children }: { children: ReactNode }) {
 			}
 
 			if (result.data?.login?.user) {
-				// Refetch CurrentUser query to ensure session is established
-				reexecuteCurrentUser({ requestPolicy: "network-only" });
 				return { success: true };
 			}
 
@@ -61,12 +59,8 @@ export function AuthProvider({ children }: { children: ReactNode }) {
 	const logout = async () => {
 		try {
 			await executeLogout({});
-			// Refetch CurrentUser query to ensure session is cleared
-			reexecuteCurrentUser({ requestPolicy: "network-only" });
 		} catch (error) {
 			console.error("Logout failed:", error);
-			// Even on error, refetch to get the latest state
-			reexecuteCurrentUser({ requestPolicy: "network-only" });
 		}
 	};
 
-- 
cgit v1.2.3-70-g09d2

