From ea935569520c8bb9855b4a2d34824832ae4986a0 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Mon, 13 Apr 2026 21:04:21 +0900 Subject: [PATCH] #95 --- .../src/components/common/SectionTitle.tsx | 12 +++--- frontend/src/pages/MorePage.tsx | 41 ++++++++++--------- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/frontend/src/components/common/SectionTitle.tsx b/frontend/src/components/common/SectionTitle.tsx index fb8b6bf..81e7158 100644 --- a/frontend/src/components/common/SectionTitle.tsx +++ b/frontend/src/components/common/SectionTitle.tsx @@ -1,9 +1,11 @@ -import React from 'react' +import { cn } from '@/lib/utils' -type Props = { children: React.ReactNode } +import type { ComponentPropsWithoutRef, FC } from 'react' +type Props = ComponentPropsWithoutRef<'h2'> -export default ({ children }: Props) => ( -

+ +export default (({ children, className, ...rest }: Props) => ( +

{children} -

) + )) satisfies FC diff --git a/frontend/src/pages/MorePage.tsx b/frontend/src/pages/MorePage.tsx index 98c3efa..a798a26 100644 --- a/frontend/src/pages/MorePage.tsx +++ b/frontend/src/pages/MorePage.tsx @@ -16,28 +16,31 @@ export default (() => { { tag: null, wikiId: null, user: { } as User, pathName: location.pathname }) return ( - + {`メニュー | ${ SITE_TITLE }`} - {menu.map ((item, i) => ( -
- {item.name} -
    - {item.subMenu - .filter (subItem => (subItem.visible ?? true)) - .map ((subItem, j) => ('name' in subItem && ( -
  • - - {subItem.name} - -
  • )))} -
-
))} + {[...Array (Math.ceil (menu.length / 4)).keys ()].map (i => ( +
+ {menu.slice (4 * i, 4 * (i + 1)).map ((item, j) => ( +
+ {item.name} +
    + {item.subMenu + .filter (subItem => (subItem.visible ?? true)) + .map ((subItem, k) => ('name' in subItem && ( +
  • + + {subItem.name} + +
  • )))} +
+
))} +
))}
) }) satisfies FC