From abebfae43a587a8a33b19dace5e24262a55251ca Mon Sep 17 00:00:00 2001 From: GuillaumeSD Date: Wed, 1 Jan 2025 21:23:13 +0100 Subject: [PATCH] feat : add custom pages title --- src/components/pageTitle.tsx | 10 ++++++++++ src/pages/_app.tsx | 12 +++--------- src/pages/_document.tsx | 5 ++--- src/pages/database.tsx | 3 +++ src/pages/index.tsx | 3 +++ src/pages/play.tsx | 3 +++ 6 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 src/components/pageTitle.tsx diff --git a/src/components/pageTitle.tsx b/src/components/pageTitle.tsx new file mode 100644 index 0000000..57c12a6 --- /dev/null +++ b/src/components/pageTitle.tsx @@ -0,0 +1,10 @@ +import Head from "next/head"; + +export const PageTitle = ({ title }: { title: string }) => { + return ( + + {title} + + + ); +}; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index a28af52..c877f20 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -3,18 +3,12 @@ import "@fontsource/roboto/400.css"; import "@fontsource/roboto/500.css"; import "@fontsource/roboto/700.css"; import { AppProps } from "next/app"; -import Head from "next/head"; import Layout from "@/sections/layout"; export default function MyApp({ Component, pageProps }: AppProps) { return ( - <> - - Free Chess - - - - - + + + ); } diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index b12cc5c..98e45ad 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -24,12 +24,11 @@ export default function Document() { /> {/* Balises OG (Facebook & Twitter) */} - {/* Balise Twitter */} diff --git a/src/pages/database.tsx b/src/pages/database.tsx index 6d369ce..458faa4 100644 --- a/src/pages/database.tsx +++ b/src/pages/database.tsx @@ -13,6 +13,7 @@ import { red } from "@mui/material/colors"; import LoadGameButton from "@/sections/loadGame/loadGameButton"; import { useGameDatabase } from "@/hooks/useGameDatabase"; import { useRouter } from "next/router"; +import { PageTitle } from "@/components/pageTitle"; const gridLocaleText: GridLocaleText = { ...GRID_DEFAULT_LOCALE_TEXT, @@ -147,6 +148,8 @@ export default function GameDatabase() { gap={4} marginTop={6} > + + diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 534435e..60bf245 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -26,6 +26,7 @@ import { useEffect, useState } from "react"; import { Icon } from "@iconify/react"; import EngineSettingsButton from "@/sections/engineSettings/engineSettingsButton"; import GraphTab from "@/sections/analysis/panelBody/graphTab"; +import { PageTitle } from "@/components/pageTitle"; export default function GameReview() { const theme = useTheme(); @@ -60,6 +61,8 @@ export default function GameReview() { return ( + + + +