2025-06-30 15:54:10 -04:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
import React, { useState, useEffect } from 'react';
|
|
|
|
|
import classnames from 'classnames';
|
|
|
|
|
import Link from 'next/link';
|
|
|
|
|
import Button from './Button';
|
|
|
|
|
import Image from 'next/image';
|
2025-07-02 16:39:16 -04:00
|
|
|
|
|
|
|
|
export interface MenuItem {
|
2025-07-03 13:35:22 -04:00
|
|
|
id: string;
|
2025-07-02 16:39:16 -04:00
|
|
|
title: string;
|
|
|
|
|
route?: string;
|
|
|
|
|
children?: MenuItem[];
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-10 11:52:38 -04:00
|
|
|
// const menuItems: MenuItem[] = [
|
|
|
|
|
// {
|
|
|
|
|
// id: "members",
|
|
|
|
|
// title: "Members",
|
|
|
|
|
// children: [
|
|
|
|
|
// {
|
|
|
|
|
// id: "findMedicalProvider",
|
|
|
|
|
// title: "Find a Medical Provider",
|
|
|
|
|
// route: "",
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "obtainRxInformation",
|
|
|
|
|
// title: "Obtain Rx Information",
|
|
|
|
|
// route: "",
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "employers",
|
|
|
|
|
// title: "Employers",
|
|
|
|
|
// children: [
|
|
|
|
|
// {
|
|
|
|
|
// id: "employerServices",
|
|
|
|
|
// title: "Employer Services",
|
|
|
|
|
// route: "",
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "selfFundedPlans",
|
|
|
|
|
// title: "Self-Funded Plans",
|
|
|
|
|
// route: "",
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "controlHealthCareCosts",
|
|
|
|
|
// title: "Control Health Care Costs",
|
|
|
|
|
// route: "",
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "providers",
|
|
|
|
|
// title: "Providers",
|
|
|
|
|
// children: [
|
|
|
|
|
// {
|
|
|
|
|
// id: "eligibilityLookup",
|
|
|
|
|
// title: "Eligibility Lookup",
|
|
|
|
|
// route: "",
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "contactBbs",
|
|
|
|
|
// title: "Contact BBS",
|
|
|
|
|
// route: "",
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// id: "brokers",
|
|
|
|
|
// title: "Brokers",
|
|
|
|
|
// route: "",
|
|
|
|
|
// },
|
|
|
|
|
// ];
|
2025-06-30 15:54:10 -04:00
|
|
|
|
|
|
|
|
const Navbar = () => {
|
|
|
|
|
const [isScrolled, setIsScrolled] = useState(false);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
const handleScroll = () => {
|
2025-07-08 14:57:06 -04:00
|
|
|
const subtractedHeight = window.innerHeight - 80;
|
|
|
|
|
if (window.scrollY > subtractedHeight) {
|
2025-06-30 15:54:10 -04:00
|
|
|
setIsScrolled(true);
|
|
|
|
|
} else {
|
|
|
|
|
setIsScrolled(false);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
window.addEventListener('scroll', handleScroll);
|
|
|
|
|
|
|
|
|
|
return () => {
|
|
|
|
|
window.removeEventListener('scroll', handleScroll);
|
|
|
|
|
};
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
return (
|
2025-07-16 17:27:22 -04:00
|
|
|
<nav className="fixed top-0 left-0 z-10 hidden md:flex w-full h-[85px] justify-center bg-transparent">
|
2025-06-30 15:54:10 -04:00
|
|
|
<div className={classnames(
|
2025-07-16 17:27:22 -04:00
|
|
|
"w-11/12 bg-platinum px-1 text-deepcove rounded-b-3xl", {
|
2025-07-08 14:57:06 -04:00
|
|
|
"h-13 pb-1 border-b-2 border-x-2 border-black" : isScrolled,
|
|
|
|
|
"h-full pb-4" : !isScrolled
|
2025-06-30 15:54:10 -04:00
|
|
|
}
|
|
|
|
|
)}
|
|
|
|
|
>
|
2025-07-10 13:29:33 -04:00
|
|
|
<div className="w-full px-3 justify-between items-center flex">
|
2025-07-16 17:27:22 -04:00
|
|
|
<div className={classnames('rounded-b-2xl bg-deepcove w-72', {"hidden" : isScrolled})}>
|
2025-06-30 15:54:10 -04:00
|
|
|
<Image
|
|
|
|
|
src="/images/bbstpa-forsite.png"
|
|
|
|
|
alt="Britton Logo"
|
2025-07-03 13:35:22 -04:00
|
|
|
width={205}
|
|
|
|
|
height={60}
|
2025-06-30 15:54:10 -04:00
|
|
|
/>
|
|
|
|
|
</div>
|
2025-07-16 17:27:22 -04:00
|
|
|
<div className={classnames('rounded-b-2xl py-2 mb-1 bg-deepcove font-semibold text-platinum text-center text-lg uppercase w-72', {"hidden" : !isScrolled})}>
|
2025-07-01 16:56:24 -04:00
|
|
|
<Link href="/">
|
|
|
|
|
Britton Benefit Services
|
|
|
|
|
</Link>
|
|
|
|
|
</div>
|
2025-07-10 11:52:38 -04:00
|
|
|
<ul className={classnames("flex space-x-4 font-semibold text-xl", {"pl-2" : isScrolled})}>
|
2025-06-30 15:54:10 -04:00
|
|
|
<li>
|
2025-07-16 17:27:22 -04:00
|
|
|
<Link href="/members" className="hover:text-bluemana">
|
|
|
|
|
Members
|
2025-06-30 15:54:10 -04:00
|
|
|
</Link>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2025-07-16 17:27:22 -04:00
|
|
|
<Link href="/employers" className="hover:text-bluemana">
|
|
|
|
|
Employers
|
2025-06-30 15:54:10 -04:00
|
|
|
</Link>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2025-07-16 17:27:22 -04:00
|
|
|
<Link href="/" className="hover:text-bluemana">
|
2025-06-30 15:54:10 -04:00
|
|
|
Providers
|
|
|
|
|
</Link>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2025-07-16 17:27:22 -04:00
|
|
|
<Link href="/" className="hover:text-bluemana">
|
2025-06-30 15:54:10 -04:00
|
|
|
Brokers
|
|
|
|
|
</Link>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2025-07-16 17:27:22 -04:00
|
|
|
<Link href="/" className="hover:text-bluemana">
|
2025-07-10 11:52:38 -04:00
|
|
|
Services
|
2025-06-30 15:54:10 -04:00
|
|
|
</Link>
|
|
|
|
|
</li>
|
2025-07-10 11:52:38 -04:00
|
|
|
</ul>
|
|
|
|
|
{/* <div className={classnames("flex space-x-4 font-semibold text-lg", {"pl-2" : isScrolled})}>
|
2025-07-02 16:39:16 -04:00
|
|
|
{menuItems.map((item) => {
|
|
|
|
|
return item.hasOwnProperty("children") ?
|
|
|
|
|
(
|
|
|
|
|
<Dropdown item={item} />
|
|
|
|
|
) : (
|
2025-07-16 17:27:22 -04:00
|
|
|
<Link className="hover:text-bluemana" href={item?.route || ""}>
|
2025-07-02 16:39:16 -04:00
|
|
|
{item.title}
|
|
|
|
|
</Link>
|
|
|
|
|
);
|
|
|
|
|
})}
|
2025-07-10 11:52:38 -04:00
|
|
|
</div> */}
|
2025-07-01 16:56:24 -04:00
|
|
|
<div className={classnames("flex space-x-2 font-semibold", {"pt-1" : isScrolled})}>
|
2025-07-24 13:46:38 -04:00
|
|
|
<Link href="/dashboard/member">
|
2025-07-16 17:27:22 -04:00
|
|
|
<button className="bg-platinum text-copper hover:text-bronze py-1 px-4 rounded border-1 border-copper hover:border-bronze">
|
|
|
|
|
Sign In
|
|
|
|
|
</button>
|
|
|
|
|
</Link>
|
|
|
|
|
{/* <Button href="" className="bg-platinum text-copper hover:text-bronze py-1 px-4 rounded border-1 border-copper hover:border-bronze">
|
2025-06-30 15:54:10 -04:00
|
|
|
Sign In
|
2025-07-16 17:27:22 -04:00
|
|
|
</Button> */}
|
|
|
|
|
<Button className="bg-deepcove hover:bg-bluetang text-bluemana py-1 px-4 rounded">
|
2025-06-30 15:54:10 -04:00
|
|
|
Get a Quote
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</nav>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default Navbar;
|