From a4a684c3e52c2405d4ed3406d555eea15b0b17d5 Mon Sep 17 00:00:00 2001 From: ItsukiKigoshi Date: Thu, 1 Aug 2024 18:53:34 +0900 Subject: [PATCH 1/2] fix: delete no longer exisisting component --- src/app/reading/page.tsx | 1 - 1 file changed, 1 deletion(-) 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"; From 894d0681e894c6caf00f693cdc6c3ffc267754a7 Mon Sep 17 00:00:00 2001 From: ItsukiKigoshi Date: Thu, 1 Aug 2024 19:18:44 +0900 Subject: [PATCH 2/2] refactor: Update Footer component with new link buttons and remove unused icons --- src/components/Footer.tsx | 59 ++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 26 deletions(-) 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 (