diff --git a/website/app/[locale]/(root)/play/Play.tsx b/website/app/[locale]/(root)/play/Play.tsx index 905aeb890..26d9d6ae0 100644 --- a/website/app/[locale]/(root)/play/Play.tsx +++ b/website/app/[locale]/(root)/play/Play.tsx @@ -156,9 +156,10 @@ export default function Play(props: any) { ); useEffect(() => { - const queryLayout = searchParams.get('layout') - const queryPreview = searchParams.get('preview') - const queryTab = searchParams.get('tab') + const urlSearchParams = new URLSearchParams(location.search) + const queryLayout = urlSearchParams.get('layout') + const queryPreview = urlSearchParams.get('preview') + const queryTab = urlSearchParams.get('tab') if (queryLayout) { setLayout(queryLayout) } diff --git a/website/app/[locale]/(root)/play/[shareId]/page.tsx b/website/app/[locale]/(root)/play/[shareId]/page.tsx index 84c6471b7..64addb564 100644 --- a/website/app/[locale]/(root)/play/[shareId]/page.tsx +++ b/website/app/[locale]/(root)/play/[shareId]/page.tsx @@ -4,8 +4,6 @@ import { initializeFirestore } from 'firebase-admin/firestore' import { notFound } from "next/navigation" import { collectDictionary } from 'websites/dictionaries' -export const dynamic = 'force-dynamic' - export default async function Page(props: any) { const store = initializeFirestore(app) const { shareId, locale } = props.params