prevent prefetch of login/logout

This commit is contained in:
Sara
2023-11-01 17:17:49 +01:00
committed by Mathieu Virbel
parent 0be1bbe96a
commit 1e262ff8b4
3 changed files with 3 additions and 4 deletions

View File

@@ -7,14 +7,14 @@ export default function UserInfo() {
return !isAuthenticated ? ( return !isAuthenticated ? (
<span className="hover:underline focus-within:underline underline-offset-2 decoration-[.5px] font-light px-2"> <span className="hover:underline focus-within:underline underline-offset-2 decoration-[.5px] font-light px-2">
<Link href="/login" className="outline-none"> <Link href="/login" className="outline-none" prefetch={false}>
Log in Log in
</Link> </Link>
</span> </span>
) : ( ) : (
<span className="font-light px-2"> <span className="font-light px-2">
<span className="hover:underline focus-within:underline underline-offset-2 decoration-[.5px]"> <span className="hover:underline focus-within:underline underline-offset-2 decoration-[.5px]">
<Link href="/logout" className="outline-none"> <Link href="/logout" className="outline-none" prefetch={false}>
Log out Log out
</Link> </Link>
</span> </span>

View File

@@ -9,7 +9,6 @@ import Image from "next/image";
import Link from "next/link"; import Link from "next/link";
import About from "../(aboutAndPrivacy)/about"; import About from "../(aboutAndPrivacy)/about";
import Privacy from "../(aboutAndPrivacy)/privacy"; import Privacy from "../(aboutAndPrivacy)/privacy";
import { get } from "@vercel/edge-config";
import { DomainContextProvider } from "./domainContext"; import { DomainContextProvider } from "./domainContext";
import { getConfig } from "../lib/edgeConfig"; import { getConfig } from "../lib/edgeConfig";

View File

@@ -55,7 +55,7 @@ export default function TranscriptDetails(details: TranscriptDetails) {
return ( return (
<> <>
{transcript?.loading === true || topics?.loading === true ? ( {!transcriptId || transcript?.loading || topics?.loading ? (
<Modal title="Loading" text={"Loading transcript..."} /> <Modal title="Loading" text={"Loading transcript..."} />
) : ( ) : (
<> <>