feat: topics page

This commit is contained in:
2023-11-14 10:51:58 +00:00
parent f2a41cb474
commit c530e4ba72
5 changed files with 40 additions and 9 deletions

View File

@ -89,6 +89,17 @@ export function RootTabs({ base }: { base?: string }) {
</>
),
},
{
tab: "tags",
path: `${base}/topics`,
show: tags.item.length > 0,
element: (
<>
<Icon name="hash" />
<FormattedMessage defaultMessage="Topics" />
</>
),
},
] as Array<{
tab: RootTab;
path: string;
@ -141,15 +152,6 @@ export function RootTabs({ base }: { base?: string }) {
{a.element}
</MenuItem>
))}
{tags.item.map(v => (
<MenuItem
onClick={() => {
navigate(`${base}/t/${v}`);
}}>
<Icon name="hash" />
{v}
</MenuItem>
))}
</Menu>
</div>
);