From 792c92c526872d840ad944d86f18814cca51e6cb Mon Sep 17 00:00:00 2001 From: Liam <67254223+RealFascinated@users.noreply.github.com> Date: Fri, 21 Oct 2022 10:56:50 +0100 Subject: [PATCH] Add better SEO --- pages/_app.js | 68 ++++++++++++++++++++------------------- pages/_document.js | 1 + pages/index.js | 3 ++ pages/overlay.js | 80 ++++++++++++++++++++++++---------------------- 4 files changed, 81 insertions(+), 71 deletions(-) diff --git a/pages/_app.js b/pages/_app.js index 82c53aa..3cbe125 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -1,5 +1,5 @@ import { createTheme, NextUIProvider } from "@nextui-org/react"; -import { NextSeo } from "next-seo"; +import { DefaultSeo } from "next-seo"; import { ThemeProvider as NextThemesProvider } from "next-themes"; import "../styles/globals.css"; @@ -19,38 +19,40 @@ const darkTheme = createTheme({ function MyApp({ Component, pageProps }) { return ( - - - - - - + <> + + + + + + + ); } diff --git a/pages/_document.js b/pages/_document.js index a593398..46431a4 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -16,6 +16,7 @@ class MyDocument extends Document { {CssBaseline.flush()} + + + - {!isValidSteamId ? ( -
-

Invalid player, please visit the main page.

- - Go Home - -
- ) : ( -
- {showPlayerStats && !loadingPlayerData ? ( - - ) : ( - <> - )} - {this.state.showScore && this.state.isVisible ? ( - - ) : ( - <> - )} - {this.state.showSongInfo && - this.state.beatSaverData !== undefined && - this.state.isVisible ? ( - - ) : ( - <> - )} -
- )} - + <> + +
+ {!isValidSteamId ? ( +
+

Invalid player, please visit the main page.

+ + Go Home + +
+ ) : ( +
+ {showPlayerStats && !loadingPlayerData ? ( + + ) : ( + <> + )} + {this.state.showScore && this.state.isVisible ? ( + + ) : ( + <> + )} + {this.state.showSongInfo && + this.state.beatSaverData !== undefined && + this.state.isVisible ? ( + + ) : ( + <> + )} +
+ )} +
+ ); } }