|
1 |
| -"use client" |
| 1 | +"use client"; |
2 | 2 |
|
3 |
| -import { Disclosure } from "@headlessui/react" |
4 |
| -import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/outline" |
5 |
| -import Link from "next/link" |
6 |
| -import AlertsButton from "./alerts/AlertsButton" |
7 |
| -import dynamic from "next/dynamic" |
| 3 | +import { Disclosure } from "@headlessui/react"; |
| 4 | +import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/outline"; |
| 5 | +import Link from "next/link"; |
| 6 | +import AlertsButton from "./alerts/AlertsButton"; |
| 7 | +import dynamic from "next/dynamic"; |
8 | 8 | const AuthenticationNavigation = dynamic(
|
9 | 9 | () => import("./authentication/AuthenticationNavigation"),
|
10 | 10 | { ssr: false },
|
11 |
| -) |
| 11 | +); |
12 | 12 |
|
13 | 13 | const navigation = [
|
14 | 14 | { name: "About", to: "/about" },
|
15 | 15 | { name: "Authentication", to: "/authentication" },
|
16 | 16 | { name: "Blog", to: "/blog" },
|
17 |
| -] |
| 17 | +]; |
18 | 18 |
|
19 | 19 | const renderIcon = (open: boolean) => {
|
20 | 20 | if (!open) {
|
21 |
| - return <Bars3Icon className="block h-6 w-6" aria-hidden="true" /> |
| 21 | + return <Bars3Icon className="block h-6 w-6" aria-hidden="true" />; |
22 | 22 | } else {
|
23 |
| - return <XMarkIcon className="block h-6 w-6" aria-hidden="true" /> |
| 23 | + return <XMarkIcon className="block h-6 w-6" aria-hidden="true" />; |
24 | 24 | }
|
25 |
| -} |
| 25 | +}; |
26 | 26 |
|
27 | 27 | const renderNavLinks = (style: string) => {
|
28 | 28 | return navigation.map((nav) => (
|
29 | 29 | <Link href={nav.to} key={nav.name} className={style}>
|
30 | 30 | {nav.name}
|
31 | 31 | </Link>
|
32 |
| - )) |
33 |
| -} |
| 32 | + )); |
| 33 | +}; |
34 | 34 | export default function Navigation() {
|
35 | 35 | return (
|
36 | 36 | <header>
|
@@ -84,5 +84,5 @@ export default function Navigation() {
|
84 | 84 | )}
|
85 | 85 | </Disclosure>
|
86 | 86 | </header>
|
87 |
| - ) |
| 87 | + ); |
88 | 88 | }
|
0 commit comments