diff --git a/src/app/reading/page.tsx b/src/app/reading/page.tsx index 072d05f..41c9a47 100644 --- a/src/app/reading/page.tsx +++ b/src/app/reading/page.tsx @@ -1,4 +1,3 @@ -import ButtonGoHome from "@/components/ButtonGoHome"; import { Stack, Typography } from "@mui/material"; import React from "react"; diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 89f760c..c5525e7 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -6,7 +6,32 @@ import TipsAndUpdatesIcon from "@mui/icons-material/TipsAndUpdates"; import { Button, ButtonGroup, Paper, Stack } from "@mui/material"; export default function Footer() { - const row_1 = [ + type Items = { + title: string; + url: string; + inNewTab: boolean; + icon: React.ReactNode; + }; + + const mapButtons = (items: Items[]): React.ReactNode => { + return items.map((item) => ( + + )); + }; + + const row_1 = mapButtons([ { title: "Home", url: "/", @@ -16,49 +41,31 @@ export default function Footer() { { title: "Curation", url: "/curation", - isNewTab: false, + inNewTab: false, icon: , }, { title: "Reading", url: "/reading", - isNewTab: false, + inNewTab: false, icon: , }, - ].map((item) => ( - - )); + ]); - const row_2 = [ + const row_2 = mapButtons([ { title: "特定商取引法に基づく表記", url: "/salespolicy", - isNewTab: false, + inNewTab: false, icon: , }, { title: "Source", url: "https://github.com/ItsukiKigoshi/itsukikigoshi.github.io", - isNewTab: true, + inNewTab: true, icon: , }, - ].map((item) => ( - - )); + ]); return (