diff --git a/components/layout/Header.tsx b/components/layout/Header.tsx index b74dc373e..75d700fe0 100644 --- a/components/layout/Header.tsx +++ b/components/layout/Header.tsx @@ -58,7 +58,12 @@ const Header = ({ openNav }: { openNav: () => void }) => { <> -{" "} { }; export const useActiveNavItem = () => { - const [navItem, setNavItem] = useState< - undefined | { code: string; name: string } - >(undefined); + const [navItem, setNavItem] = + useState( + undefined + ); const router = useRouter(); const firstPath = router.pathname.split("/")[1]; diff --git a/pages/splatoon3/[[...slug]].tsx b/pages/splatoon3/[[...slug]].tsx index 06b12f102..47b65678d 100644 --- a/pages/splatoon3/[[...slug]].tsx +++ b/pages/splatoon3/[[...slug]].tsx @@ -4,6 +4,7 @@ import MyLink from "components/common/MyLink"; import Video from "components/common/Video"; import type { GetStaticPaths, GetStaticProps } from "next"; import Image from "next/image"; +import { capitalizeFirstLetter } from "utils/strings"; import * as z from "zod"; const pages = { @@ -61,7 +62,11 @@ export const getStaticProps: GetStaticProps = async ({ params }) => { const Splatoon3Page = ({ page }: Props) => { return ( <> - + { return undefined; }; + +export const capitalizeFirstLetter = (string: string) => { + return string.charAt(0).toUpperCase() + string.slice(1); +};