ぼざクリタグ広場 https://hub.nizika.monster
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

44 lines
1.1 KiB

  1. import { Helmet } from 'react-helmet-async'
  2. import PrefetchLink from '@/components/PrefetchLink'
  3. import { menuOutline } from '@/components/TopNav'
  4. import SectionTitle from '@/components/common/SectionTitle'
  5. import MainArea from '@/components/layout/MainArea'
  6. import { SITE_TITLE } from '@/config'
  7. import type { FC } from 'react'
  8. import type { User } from '@/types'
  9. export default (() => {
  10. const menu = menuOutline (
  11. { tag: null, wikiId: null, user: { } as User, pathName: location.pathname })
  12. return (
  13. <MainArea>
  14. <Helmet>
  15. <title>{`メニュー | ${ SITE_TITLE }`}</title>
  16. </Helmet>
  17. {menu.map ((item, i) => (
  18. <section key={i}>
  19. <SectionTitle>{item.name}</SectionTitle>
  20. <ul>
  21. {item.subMenu
  22. .filter (subItem => (subItem.visible ?? true))
  23. .map ((subItem, j) => ('name' in subItem && (
  24. <li key={j}>
  25. <PrefetchLink
  26. to={subItem.to}
  27. target={subItem.to.slice (0, 2) === '//'
  28. ? '_blank'
  29. : undefined}>
  30. {subItem.name}
  31. </PrefetchLink>
  32. </li>)))}
  33. </ul>
  34. </section>))}
  35. </MainArea>)
  36. }) satisfies FC