From 9bbf8ca2394d7182b3e46d372a4a0f65995d1991 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Sun, 6 Dec 2020 18:00:28 +0200 Subject: [PATCH] title on frontpage --- components/common/MyHead.tsx | 5 +++-- pages/index.tsx | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/common/MyHead.tsx b/components/common/MyHead.tsx index 0a56e109b..60ddfc307 100644 --- a/components/common/MyHead.tsx +++ b/components/common/MyHead.tsx @@ -2,10 +2,11 @@ import Head from "next/head"; interface Props { title: string; + appendSendouInk?: boolean; } -const MyHead: React.FC = ({ title }) => { - const pageTitle = `${title} | sendou.ink`; +const MyHead: React.FC = ({ title, appendSendouInk = true }) => { + const pageTitle = appendSendouInk ? `${title} | sendou.ink` : title; return ( {pageTitle} diff --git a/pages/index.tsx b/pages/index.tsx index e5f596055..ef07c9499 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,5 +1,6 @@ import { Box, Container, Flex, Heading, useColorMode } from "@chakra-ui/react"; import { t, Trans } from "@lingui/macro"; +import MyHead from "components/common/MyHead"; import MyLink from "components/common/MyLink"; import { useMyTheme } from "lib/useMyTheme"; import Image from "next/image"; @@ -10,6 +11,10 @@ const Home = () => { const { colorMode } = useColorMode(); return ( <> +