import Link from "next/link"; import { useRouter } from "next/router"; import { useState } from "react"; import { FaAngleRight } from "react-icons/fa"; import { useAuth } from "../../contexts/authContext"; import MainLogo from "../MainLogo"; enum LandingPageNavigation { product = "/", features = "/features", pricing = "/pricing", philosophy = "/philosophy", } export default function LangingPageLayout({ children }) { const { currUser } = useAuth(); const router = useRouter(); const [loading, setLoading] = useState(false); const currPage = router.pathname; console.log(currPage); function handleLogin() { setLoading(true); router.push("/teams"); } const handleGetDemo = () => { window.open("https://calendly.com/usenirvana/30min", "_blank"); }; const getStartedButton = ( ); return (
{/* header */}
window.open(LandingPageNavigation.product, "_self") } className={`text-gray-500 hover:text-teal-600 hover:cursor-pointer ${ currPage == LandingPageNavigation.product ? "text-teal-600 underline underline-offset-4" : "" }`} > Product Features Pricing Philosophy {currUser ? ( <> Welcome back! ) : ( <> )} {getStartedButton}
{children}
); }