-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNav.tsx
More file actions
38 lines (35 loc) · 1.11 KB
/
Nav.tsx
File metadata and controls
38 lines (35 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import Link from "next/link";
import Image from "next/image";
import ThemeToggle from "components/ThemeToggle";
import MainMenu from "./MainMenu";
function Nav() {
const PUBLIC_SITE_ICON_URL =
process.env.NEXT_PUBLIC_SITE_ICON_URL || "/site_logo.svg";
const PUBLIC_SITE_TITLE =
process.env.NEXT_PUBLIC_SITE_TITLE || "Web Template";
return (
<div className="border-b w-screen px-2 md:px-16">
<nav className="flex flex-wrap text-center md:text-left md:flex flex-row w-full justify-between items-center py-4 ">
<div className="flex items-center">
<Link href="/">
<a className="flex items-center">
{PUBLIC_SITE_ICON_URL.length > 0 ? (
<Image
src={PUBLIC_SITE_ICON_URL}
height={32}
width={32}
alt="Logo"
/>
) : (
<span className="text-2xl">{PUBLIC_SITE_TITLE}</span>
)}
</a>
</Link>
<MainMenu />
</div>
<ThemeToggle />
</nav>
</div>
);
}
export default Nav;