Files
pse.dev/components/main-nav.tsx
Y6NDR bcbb008c33 v2 Beta (#18)
* Finished the first release for the website

* Removed dark bg

* Commented tailwind config file and style.css

* Removed theme provider component from next

* Changed some png to svg, fixed some alignments and added favicon

* chore:  Add `framer-motion` package

* fix: 💄 Add orange to tailwind, update fonts, hover state for nav items

* chore:  Add `gsap`package

* feat: 💫 Add `WhatWeDo` logo animation

* Fixed homepage whatwedo for mobile and modified projects file

* Fixed on homepage dynamic content box

* Fixed homepage logo size on first section

* Fixed the width size of the pse logo on homepage

* Added new color on tailwindfile and changed border color on mainnav

* feat: 📱 Make "What We Do" section responsive

* Change image to webp and ajust size of images

* fix: ✏️ Fix typo on home page

* revert: 💫 Remove animation from `WhatWeDo` section

* update home page promo link

* Change some icons to svg, change bg on project page and project lib page

* Add more social media svg, change svg in project page and project lib page

* Change links on homepage to p tag, resize grid cols on projects lib page

* Change NextImage NextLink names and change a tag to p tag

* fix: 💄 Fix alignment of home page sections

---------

Co-authored-by: samueloh99 <samueloh99@gmail.com>
Co-authored-by: Samuel Oh <28302358+samueloh99@users.noreply.github.com>
Co-authored-by: Chiali Tsai <info@chialitsai.com>
2023-06-29 15:05:09 -05:00

44 lines
1.2 KiB
TypeScript

"use client"
import NextImage from "next/image"
import Link from "next/link"
import { usePathname } from "next/navigation"
import PSELogo from "@/public/logos/header-logo.svg"
import { NavItem } from "@/types/nav"
interface MainNavProps {
items: NavItem[]
}
export function MainNav({ items }: MainNavProps) {
const router = usePathname()
return (
<div className="flex gap-6 md:gap-10">
<Link href="/" className="flex items-center space-x-2">
<NextImage src={PSELogo} alt="logo" width={32} height={32} />
</Link>
<nav className="hidden items-center gap-6 md:flex">
{items.map((item, index) => {
return (
<Link
key={index}
href={item.href}
className={`uppercase ${
item.disabled && "cursor-not-allowed"
} flex items-center border-b-4 ${
item.href !== router
? "border-transparent"
: "border-orangeDark"
} text-base font-medium transition-opacity duration-200 ease-in-out hover:opacity-70`}
>
{item.title}
</Link>
)
})}
</nav>
</div>
)
}