From 1e262ff8b496dfe9525bf01787c0e9736da26f80 Mon Sep 17 00:00:00 2001 From: Sara Date: Wed, 1 Nov 2023 17:17:49 +0100 Subject: [PATCH] prevent prefetch of login/logout --- www/app/(auth)/userInfo.tsx | 4 ++-- www/app/[domain]/layout.tsx | 1 - www/app/[domain]/transcripts/[transcriptId]/page.tsx | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/www/app/(auth)/userInfo.tsx b/www/app/(auth)/userInfo.tsx index f4840f3f..76e55acb 100644 --- a/www/app/(auth)/userInfo.tsx +++ b/www/app/(auth)/userInfo.tsx @@ -7,14 +7,14 @@ export default function UserInfo() { return !isAuthenticated ? ( - + Log in ) : ( - + Log out diff --git a/www/app/[domain]/layout.tsx b/www/app/[domain]/layout.tsx index 49f584c6..bfb80101 100644 --- a/www/app/[domain]/layout.tsx +++ b/www/app/[domain]/layout.tsx @@ -9,7 +9,6 @@ import Image from "next/image"; import Link from "next/link"; import About from "../(aboutAndPrivacy)/about"; import Privacy from "../(aboutAndPrivacy)/privacy"; -import { get } from "@vercel/edge-config"; import { DomainContextProvider } from "./domainContext"; import { getConfig } from "../lib/edgeConfig"; diff --git a/www/app/[domain]/transcripts/[transcriptId]/page.tsx b/www/app/[domain]/transcripts/[transcriptId]/page.tsx index 817bd5fe..d4f40428 100644 --- a/www/app/[domain]/transcripts/[transcriptId]/page.tsx +++ b/www/app/[domain]/transcripts/[transcriptId]/page.tsx @@ -55,7 +55,7 @@ export default function TranscriptDetails(details: TranscriptDetails) { return ( <> - {transcript?.loading === true || topics?.loading === true ? ( + {!transcriptId || transcript?.loading || topics?.loading ? ( ) : ( <>