8000 feat: add style to current navigator · codeisneverodd/home@ab503be · GitHub
[go: up one dir, main page]

Skip to content

Commit ab503be

Browse files
feat: add style to current navigator
1 parent 11c1df1 commit ab503be

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/lib/@components/MainLayout.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,18 @@ function Menu() {
8888
]);
8989

9090
return (
91-
<Flex flex="1" justify="end">
91+
<Flex flex="1" justify="end" gap="12px">
9292
{menuItems.current.map(({ icon, title, href }) => (
9393
<Button
9494
key={title}
9595
leftIcon={<Icon as={FontAwesomeIcon} icon={icon} />}
9696
px="12px"
9797
py="8px"
98-
variant="ghost"
98+
variant={
99+
router.pathname.split("/")[1] === href.replace("/", "")
100+
? "solid"
101+
: "ghost"
102+
}
99103
onClick={() => {
100104
router.push(href);
101105
}}

0 commit comments

Comments
 (0)
0