@@ -16,20 +16,20 @@ import { useDisclosure } from "@mantine/hooks";
16
16
import { IconChevronDown , IconMoon , IconSun } from "@tabler/icons-react" ;
17
17
import classes from "./HeaderMenu.module.css" ;
18
18
import { useState } from "react" ;
19
+ import Link from "next/link" ;
19
20
20
21
const links = [
21
- { link : "/explore" , label : "Explore" } ,
22
+ // { link: "/explore", label: "Explore" },
22
23
{
23
- link : "#1 " ,
24
+ link : "/flutter " ,
24
25
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
+ // ],
31
32
} ,
32
- { link : "/blog" , label : "Blog" } ,
33
33
{ link : "/about-me" , label : "About me" } ,
34
34
] ;
35
35
@@ -57,54 +57,47 @@ export function HeaderMenu() {
57
57
withinPortal
58
58
>
59
59
< 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 } >
65
61
< Center >
66
62
< span className = { classes . linkLabel } > { link . label } </ span >
67
63
< IconChevronDown size = "0.9rem" stroke = { 1.5 } />
68
64
</ Center >
69
- </ a >
65
+ </ Link >
70
66
</ Menu . Target >
71
67
< Menu . Dropdown > { menuItems } </ Menu . Dropdown >
72
68
</ Menu >
73
69
) ;
74
70
}
75
71
76
72
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 } >
83
74
{ link . label }
84
- </ a >
75
+ </ Link >
85
76
) ;
86
77
} ) ;
87
78
88
79
return (
89
80
< header className = { classes . header } >
90
81
< Container size = "xl" >
91
82
< 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 >
108
101
{ /* <MantineLogo size={28} /> */ }
109
102
< Group >
110
103
< Group gap = { 5 } visibleFrom = "sm" >
0 commit comments