|
1 | 1 | import { Button } from "@/components/ui/button"; |
2 | 2 | import { Github, Moon, Play, Sun } from "lucide-react"; |
3 | 3 | import { useTheme } from "next-themes"; |
4 | | -import { Link, useNavigate, useLocation } from "react-router-dom"; |
5 | | - |
| 4 | +import { Link, useLocation, useNavigate } from "react-router-dom"; |
6 | 5 |
|
7 | 6 | const Header = () => { |
8 | 7 | const { theme, setTheme } = useTheme(); |
9 | 8 | const navigate = useNavigate(); |
10 | 9 | const location = useLocation(); |
11 | 10 |
|
12 | 11 | const isActiveLink = (path: string) => { |
13 | | - return location.pathname === path || location.pathname.startsWith(path + '/'); |
| 12 | + return location.pathname === path || location.pathname.startsWith(path + "/"); |
14 | 13 | }; |
15 | 14 |
|
16 | 15 | const toggleTheme = () => { |
@@ -38,42 +37,42 @@ const Header = () => { |
38 | 37 | <Link |
39 | 38 | to="/constructo" |
40 | 39 | className={`transition-colors hover:text-primary ${ |
41 | | - isActiveLink('/constructo') |
42 | | - ? 'text-primary' |
43 | | - : 'text-muted-foreground' |
| 40 | + isActiveLink("/constructo") |
| 41 | + ? "text-primary" |
| 42 | + : "text-muted-foreground" |
44 | 43 | }`} |
45 | 44 | > |
46 | 45 | Constructo |
47 | 46 | </Link> |
48 | 47 | <Link |
49 | 48 | to="/serendipity" |
50 | 49 | className={`transition-colors hover:text-primary ${ |
51 | | - isActiveLink('/serendipity') |
52 | | - ? 'text-primary' |
53 | | - : 'text-muted-foreground' |
| 50 | + isActiveLink("/serendipity") |
| 51 | + ? "text-primary" |
| 52 | + : "text-muted-foreground" |
54 | 53 | }`} |
55 | 54 | > |
56 | 55 | Serendipity |
57 | 56 | </Link> |
58 | 57 | <Link |
59 | 58 | to="/effulgence" |
60 | 59 | className={`transition-colors hover:text-primary ${ |
61 | | - isActiveLink('/effulgence') |
62 | | - ? 'text-primary' |
63 | | - : 'text-muted-foreground' |
| 60 | + isActiveLink("/effulgence") |
| 61 | + ? "text-primary" |
| 62 | + : "text-muted-foreground" |
64 | 63 | }`} |
65 | 64 | > |
66 | 65 | Effulgence |
67 | 66 | </Link> |
68 | | - <Link |
69 | | - to="/docs" |
| 67 | + <Link |
| 68 | + to="/docs" |
70 | 69 | className={`transition-colors hover:text-primary ${ |
71 | | - isActiveLink('/docs') |
72 | | - ? 'text-primary' |
73 | | - : 'text-muted-foreground' |
| 70 | + isActiveLink("/docs") |
| 71 | + ? "text-primary" |
| 72 | + : "text-muted-foreground" |
74 | 73 | }`} |
75 | 74 | > |
76 | | - Todas as Soluções |
| 75 | + Documentação |
77 | 76 | </Link> |
78 | 77 | </nav> |
79 | 78 |
|
|
0 commit comments