diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index cc2a2a7a0..ab2673b47 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -27,7 +27,6 @@ export default async function RootLayout({ const session = await auth(); const grantedPolicies = session?.grantedPolicies; - const sessionKey = new Date().valueOf(); return ( @@ -35,7 +34,6 @@ export default async function RootLayout({ grantedPolicies={grantedPolicies} lang={lang} session={session} - sessionKey={sessionKey} > {children} diff --git a/apps/web/src/providers/providers.tsx b/apps/web/src/providers/providers.tsx index 480531fdc..9a630e583 100644 --- a/apps/web/src/providers/providers.tsx +++ b/apps/web/src/providers/providers.tsx @@ -15,14 +15,12 @@ interface ProvidersProps { children: JSX.Element; lang: string; grantedPolicies: Record | undefined; - sessionKey: number; session: Session | null; } export default async function Providers({ children, lang, grantedPolicies, - sessionKey, session, }: ProvidersProps) { const resources = await getLocalizationResources(lang); @@ -31,7 +29,7 @@ export default async function Providers({ <> - + diff --git a/apps/web/src/providers/session.tsx b/apps/web/src/providers/session.tsx index 618dd7437..c85217e72 100644 --- a/apps/web/src/providers/session.tsx +++ b/apps/web/src/providers/session.tsx @@ -6,7 +6,6 @@ import { createContext, useContext, useMemo } from "react"; interface ProvidersProps { children: React.ReactNode; session: Session | null; - sessionKey?: number; } interface SessionContextProps { session: Session | null; @@ -19,14 +18,10 @@ export const useSession = () => { return useContext(SessionContext); }; -export function SessionProvider({ - children, - session, - sessionKey, -}: ProvidersProps) { +export function SessionProvider({ children, session }: ProvidersProps) { const memoizedSessionKey = useMemo(() => { - return sessionKey; - }, [sessionKey]); + return new Date().valueOf(); + }, [session]); return ( {children} diff --git a/packages/ayasofyazilim-ui b/packages/ayasofyazilim-ui index e36e9c098..1ed97a2a9 160000 --- a/packages/ayasofyazilim-ui +++ b/packages/ayasofyazilim-ui @@ -1 +1 @@ -Subproject commit e36e9c0987b2ee5900f976e78b62e2ef6a10a6da +Subproject commit 1ed97a2a98e57ba3c1fd28076757c01238cf1252