diff --git a/frontend/src/components/TopNav.tsx b/frontend/src/components/TopNav.tsx index 6810a85..8252b96 100644 --- a/frontend/src/components/TopNav.tsx +++ b/frontend/src/components/TopNav.tsx @@ -76,9 +76,12 @@ export const menuOutline = ( { ...message ('add'), to: '/posts/new', visible: editable }, { ...message ('allHistory'), to: '/posts/changes' }, { ...message ('help'), to: '/wiki/ヘルプ:広場' }] }, - { ...message ('tags'), to: '/tags', subMenu: [ + { ...message ('tags'), to: '/tags', + base: pathName.startsWith ('/tag-descriptions') ? '/tag-descriptions' : '/tags', + subMenu: [ { ...message ('master'), to: '/tags' }, { ...message ('nicoLinks'), to: '/tags/nico' }, + { ...message ('tagDescriptions'), to: '/tag-descriptions' }, { ...message ('allHistory'), to: '/tags/changes' }, { ...message ('help'), to: '/wiki/ヘルプ:タグ' }, { component: , visible: tagFlg }, @@ -101,7 +104,6 @@ export const menuOutline = ( { ...message ('history'), to: `/materials/changes?material_id=${ material?.id }`, visible: materialFlg }] }, ...([ - { key: 'tagDescriptions', path: '/tag-descriptions', type: 'tag_description' }, { key: 'tagGroups', path: '/tag-groups', type: 'tag_group' }] as const) .map (({ key, path, type }): MenuVisibleItem => { const current = (wikiResourceType ?? 'tag_description') === type