fix: make my pages dynamic to opt out of full router cache

This commit is contained in:
Christel Westerberg
2024-09-27 10:02:46 +02:00
parent d1b54093f2
commit a3bb1ed8a4
2 changed files with 2 additions and 14 deletions

View File

@@ -1,14 +0,0 @@
"use client"
import { useEffect } from "react"
import LoadingSpinner from "@/components/LoadingSpinner"
export default function LogoutInterceptedRoute() {
// Reload the browser on logout in order to flush router cache. This is to make sure we don't show stale user specific data.
useEffect(() => {
window.location.reload()
}, [])
return <LoadingSpinner />
}

View File

@@ -7,6 +7,8 @@ import { getProfile } from "@/lib/trpc/memoizedRequests"
import { auth } from "@/auth"
import { getLang } from "@/i18n/serverContext"
export const revalidate = 0
export default async function ProtectedLayout({
children,
}: React.PropsWithChildren) {