better admin page/list link

This commit is contained in:
yohlo
2025-08-25 22:49:19 -05:00
parent 555d79b6db
commit 38fb060b78
4 changed files with 37 additions and 29 deletions

View File

@@ -1,4 +1,4 @@
import { NavLink, Text } from "@mantine/core";
import { Divider, NavLink, Text } from "@mantine/core";
import { CaretRightIcon, Icon } from "@phosphor-icons/react";
import { Link, useNavigate } from "@tanstack/react-router";
@@ -12,15 +12,18 @@ const ListLink = ({ label, to, Icon }: ListLinkProps) => {
const navigate = useNavigate();
return (
<NavLink
w='100%'
p='md'
component={'button'}
onClick={() => navigate({ to })}
label={<Text fw={500} size='md'>{label}</Text>}
leftSection={<Icon weight='bold' size={20} />}
rightSection={<CaretRightIcon size={20} />}
/>
<>
<NavLink
w='100%'
p='md'
component={'button'}
onClick={() => navigate({ to })}
label={<Text fw={500} size='md'>{label}</Text>}
leftSection={<Icon weight='bold' size={20} />}
rightSection={<CaretRightIcon size={20} />}
/>
<Divider />
</>
)
}