From 943e23280ccb7111c2bfef7660cabadaa0b8fee0 Mon Sep 17 00:00:00 2001 From: K-Kizuku Date: Fri, 14 Jul 2023 19:45:09 +0900 Subject: [PATCH] =?UTF-8?q?[add]=20=E3=83=95=E3=82=A1=E3=83=93=E3=82=B3?= =?UTF-8?q?=E3=83=B3=E3=81=AE=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Common/others/CastomHead.tsx | 236 +++++++++++++++----- src/components/Common/others/Layout.tsx | 2 + 2 files changed, 182 insertions(+), 56 deletions(-) diff --git a/src/components/Common/others/CastomHead.tsx b/src/components/Common/others/CastomHead.tsx index 9132194..79e41b3 100644 --- a/src/components/Common/others/CastomHead.tsx +++ b/src/components/Common/others/CastomHead.tsx @@ -1,68 +1,117 @@ import React from "react"; import { useRouter } from "next/router"; -import Head from 'next/head' +import Head from "next/head"; export const CostomHead = () => { - const router = useRouter() + const router = useRouter(); const BaseMeta = () => ( <> C3 OpenCampus2023 - + - + - + - ) + ); switch (router.pathname) { case "/": return ( - + - + - + - ) + + ); case "/map": return ( - + - + - + - ) + + ); case "/web": return ( - + - + - + - ) + + ); case "/web/artifact": return ( - - - + + + - + - ) + + ); case "/web/artifact/[category]": case "/web/artifact/[category]/[artifactId]": switch (router.query.category) { @@ -70,74 +119,149 @@ export const CostomHead = () => { return ( - - - - - + + + + + - ) + ); case "game": return ( - - - - - + + + + + - ) + ); case "cg3d": return ( - - - - - + + + + + - ) + ); case "cg2d": return ( - - - - - + + + + + - ) + ); case "music": return ( - - - - - + + + + + - ) + ); default: return ( - ) + ); } default: return ( - ) + ); } -} +}; diff --git a/src/components/Common/others/Layout.tsx b/src/components/Common/others/Layout.tsx index bbcc6d5..dc84485 100644 --- a/src/components/Common/others/Layout.tsx +++ b/src/components/Common/others/Layout.tsx @@ -1,10 +1,12 @@ import React from "react"; import { TopLoading } from "../TopLoading/TopLoading"; import { CostomHead } from "./CastomHead"; +import { Gtag } from "./Gtag"; export default function Layout({ children }: { children: React.ReactNode }) { return ( <> + <>{children}