|
|
|
@@ -16,28 +16,31 @@ export default (() => { |
|
|
|
{ tag: null, wikiId: null, user: { } as User, pathName: location.pathname }) |
|
|
|
|
|
|
|
return ( |
|
|
|
<MainArea> |
|
|
|
<MainArea className="md:flex"> |
|
|
|
<Helmet> |
|
|
|
<title>{`メニュー | ${ SITE_TITLE }`}</title> |
|
|
|
</Helmet> |
|
|
|
|
|
|
|
{menu.map ((item, i) => ( |
|
|
|
<section key={i}> |
|
|
|
<SectionTitle>{item.name}</SectionTitle> |
|
|
|
<ul> |
|
|
|
{item.subMenu |
|
|
|
.filter (subItem => (subItem.visible ?? true)) |
|
|
|
.map ((subItem, j) => ('name' in subItem && ( |
|
|
|
<li key={j}> |
|
|
|
<PrefetchLink |
|
|
|
to={subItem.to} |
|
|
|
target={subItem.to.slice (0, 2) === '//' |
|
|
|
? '_blank' |
|
|
|
: undefined}> |
|
|
|
{subItem.name} |
|
|
|
</PrefetchLink> |
|
|
|
</li>)))} |
|
|
|
</ul> |
|
|
|
</section>))} |
|
|
|
{[...Array (Math.ceil (menu.length / 4)).keys ()].map (i => ( |
|
|
|
<div key={i} className="flex-1 mx-16"> |
|
|
|
{menu.slice (4 * i, 4 * (i + 1)).map ((item, j) => ( |
|
|
|
<section key={j}> |
|
|
|
<SectionTitle className="font-bold">{item.name}</SectionTitle> |
|
|
|
<ul> |
|
|
|
{item.subMenu |
|
|
|
.filter (subItem => (subItem.visible ?? true)) |
|
|
|
.map ((subItem, k) => ('name' in subItem && ( |
|
|
|
<li key={k}> |
|
|
|
<PrefetchLink |
|
|
|
to={subItem.to} |
|
|
|
target={subItem.to.slice (0, 2) === '//' |
|
|
|
? '_blank' |
|
|
|
: undefined}> |
|
|
|
{subItem.name} |
|
|
|
</PrefetchLink> |
|
|
|
</li>)))} |
|
|
|
</ul> |
|
|
|
</section>))} |
|
|
|
</div>))} |
|
|
|
</MainArea>) |
|
|
|
}) satisfies FC |