Skip to content

Commit a85e7e2

Browse files
committed
Update header
1 parent 542c851 commit a85e7e2

File tree

1 file changed

+31
-38
lines changed

1 file changed

+31
-38
lines changed

src/_components/header/HeaderMenu.tsx

Lines changed: 31 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ import { useDisclosure } from "@mantine/hooks";
1616
import { IconChevronDown, IconMoon, IconSun } from "@tabler/icons-react";
1717
import classes from "./HeaderMenu.module.css";
1818
import { useState } from "react";
19+
import Link from "next/link";
1920

2021
const links = [
21-
{ link: "/explore", label: "Explore" },
22+
// { link: "/explore", label: "Explore" },
2223
{
23-
link: "#1",
24+
link: "/flutter",
2425
label: "Flutter",
25-
links: [
26-
{ link: "/docs", label: "Documentation" },
27-
{ link: "/resources", label: "Resources" },
28-
{ link: "/community", label: "Community" },
29-
{ link: "/blog", label: "Blog" },
30-
],
26+
// links: [
27+
// { link: "/docs", label: "Documentation" },
28+
// { link: "/resources", label: "Resources" },
29+
// { link: "/community", label: "Community" },
30+
// { link: "/blog", label: "Blog" },
31+
// ],
3132
},
32-
{ link: "/blog", label: "Blog" },
3333
{ link: "/about-me", label: "About me" },
3434
];
3535

@@ -57,54 +57,47 @@ export function HeaderMenu() {
5757
withinPortal
5858
>
5959
<Menu.Target>
60-
<a
61-
href={link.link}
62-
className={classes.link}
63-
onClick={(event) => event.preventDefault()}
64-
>
60+
<Link href={link.link} className={classes.link}>
6561
<Center>
6662
<span className={classes.linkLabel}>{link.label}</span>
6763
<IconChevronDown size="0.9rem" stroke={1.5} />
6864
</Center>
69-
</a>
65+
</Link>
7066
</Menu.Target>
7167
<Menu.Dropdown>{menuItems}</Menu.Dropdown>
7268
</Menu>
7369
);
7470
}
7571

7672
return (
77-
<a
78-
key={link.label}
79-
href={link.link}
80-
className={classes.link}
81-
onClick={(event) => event.preventDefault()}
82-
>
73+
<Link key={link.label} href={link.link} className={classes.link}>
8374
{link.label}
84-
</a>
75+
</Link>
8576
);
8677
});
8778

8879
return (
8980
<header className={classes.header}>
9081
<Container size="xl">
9182
<div className={classes.inner}>
92-
<Group gap={8}>
93-
<Avatar
94-
src={"/logo/afgprogrammer-logo.png"}
95-
name="Mohammad Rahmani - Afgprogrammer"
96-
/>
97-
<Text fz={20} fw={600}>
98-
<span
99-
style={{
100-
color: "light-dark(var(--mantine-color-gray-6), white)",
101-
}}
102-
>
103-
afg
104-
</span>
105-
programmer
106-
</Text>
107-
</Group>
83+
<UnstyledButton component={Link} href="/" title="afgprogrammer">
84+
<Group gap={8}>
85+
<Avatar
86+
src={"/logo/afgprogrammer-logo.png"}
87+
name="Mohammad Rahmani - Afgprogrammer"
88+
/>
89+
<Text fz={20} fw={600}>
90+
<span
91+
style={{
92+
color: "light-dark(var(--mantine-color-gray-6), white)",
93+
}}
94+
>
95+
afg
96+
</span>
97+
programmer
98+
</Text>
99+
</Group>
100+
</UnstyledButton>
108101
{/* <MantineLogo size={28} /> */}
109102
<Group>
110103
<Group gap={5} visibleFrom="sm">

0 commit comments

Comments
 (0)