Navbar should be different in else condition but only if condition is working
function navbar() {
const router = useRouter();
if (router.pathname === /admin ) {
return <section className="text-xl font-GreatVibes">Trrinket</section>;
} else
return (
<Fragment>
<section className="hidden lg1024:block z-30 mx-8">
<div className="flex items-center justify-between">
<NavBarLinks />
<NavbarLogo />
<NavBarControls />
{/* <NavBarSearch /> */}
</div>
</section>
<section className="lg1024:hidden">
<div className="standalone:h-16">
<NavBarLogoMobile />
<NavBarMobile />
</div>
</section>
</Fragment>
);
}
export default navbar;
Different URLs as mentioned