fix: session refresh

This commit is contained in:
David Nguyen
2025-02-19 22:29:30 +11:00
parent 63e2ef0abf
commit ec07092bf6
5 changed files with 13 additions and 208 deletions

View File

@ -22,7 +22,7 @@ interface SessionProviderProps {
interface SessionContextValue {
sessionData: AppSession | null;
refresh: () => Promise<void>;
refreshSession: () => Promise<void>;
}
const SessionContext = createContext<SessionContextValue | null>(null);
@ -40,7 +40,7 @@ export const useSession = () => {
return {
...context.sessionData,
refreshSession: context.refresh,
refreshSession: context.refreshSession,
};
};
@ -102,7 +102,7 @@ export const SessionProvider = ({ children, initialSession }: SessionProviderPro
<SessionContext.Provider
value={{
sessionData: session,
refresh: refreshSession,
refreshSession,
}}
>
{children}