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