From 0cd7e1e3dfc33d062d4f725eb9a2c3f419eb49e6 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 19 Nov 2022 10:45:46 +0000 Subject: [PATCH] Add check for if we should show default metadata --- src/pages/_app.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/_app.js b/src/pages/_app.js index ed8c1c8..8fe18eb 100644 --- a/src/pages/_app.js +++ b/src/pages/_app.js @@ -3,16 +3,21 @@ import "../styles/globals.css"; import { NextUIProvider } from "@nextui-org/react"; import { SessionProvider } from "next-auth/react"; import { NextSeo } from "next-seo"; +import { useRouter } from "next/router"; import Layout from "src/components/Layout"; +import { baseOpenGraph } from "src/consts/openGraphBase"; import { darkTheme } from "src/consts/themes"; function MyApp({ Component, pageProps: { session, ...pageProps } }) { + const router = useRouter(); + const shouldReturnMetadata = router.pathname !== "/files/[fileId]"; + return (