import { m, Variants } from "framer-motion"; import { useRouter } from "next/router"; import Link from "next/link"; import { useState } from "react"; import { signIn, signOut, useSession } from "next-auth/react"; const ActiveLink = (props: { href: string; pageName: string; children: React.ReactNode; }) => { const router = useRouter(); let styling = "text-white"; // if first part of path equals the pageName if (router.pathname.split("/")[1] === props.pageName) { styling = "text-[#a855f7]"; } return ( {props.children} ); }; function NavBar() { const { data: session } = useSession(); return (
{session ? ( signOut()} >

Log out

) : ( signIn()} > )}
); } const NavSvgWrap = (props: { children: React.ReactNode }) => { return ( {props.children} ); }; const DashIcon = () => { return ( ); }; const ExitIcon = () => { return ( ); }; const RankingIcon = () => { return ( ); }; const WikiIcon = () => { return ( ); }; const LogInIcon = () => { return ( ); }; const navContainerVariants: Variants = { initial: { opacity: 0, x: -100, }, animate: { opacity: 1, x: 0, transition: { delay: 0.5, duration: 1.0, type: "spring", bounce: 0.5, stiffness: 80, delayChildren: 1.25, staggerChildren: 0.25, }, }, }; const navStripVariants: Variants = { initial: { opacity: 0, y: 40, }, animate: { opacity: 1, y: 0, transition: { duration: 1.0, type: "spring", bounce: 0.5, stiffness: 80, staggerChildren: 0.25, delayChildren: 0.1, }, }, }; const navIconVariants: Variants = { initial: { opacity: 0, }, animate: { opacity: 1, transition: { duration: 1.0, type: "spring", bounce: 0.5, stiffness: 80, }, }, }; export default NavBar;