Skip to content

Commit d2391cf

Browse files
atrakhConvex, Inc.
authored andcommitted
dashboard: removed unused function from AuthProvider (#41503)
GitOrigin-RevId: a91b3330809fc58993b1ebe7a96a8273ef706a15
1 parent 16c7fed commit d2391cf

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

npm-packages/dashboard/src/providers/AuthProvider/AuthContext.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export interface AuthContextType {
66
isAuthenticated: boolean;
77
isLoading: boolean;
88
error: Error | null;
9-
refreshAuth: () => Promise<void>;
109
}
1110

1211
export const AuthContext = createContext<AuthContextType | undefined>(

npm-packages/dashboard/src/providers/AuthProvider/AuthProvider.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ export function AuthProvider({ children }: AuthProviderProps) {
3939
}
4040
}, []);
4141

42-
const refreshAuth = useCallback(async () => {
43-
setIsLoading(true);
44-
await fetchSession();
45-
}, [fetchSession]);
46-
4742
useEffect(() => {
4843
void fetchSession();
4944
}, [fetchSession]);
@@ -59,9 +54,8 @@ export function AuthProvider({ children }: AuthProviderProps) {
5954
isAuthenticated: !!session,
6055
isLoading,
6156
error,
62-
refreshAuth,
6357
}),
64-
[user, session, isLoading, error, refreshAuth],
58+
[user, session, isLoading, error],
6559
);
6660

6761
return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;

0 commit comments

Comments
 (0)