"use client"; import { Icons, type Icon } from "@/components/icons"; import Search from "@/components/widgets/search"; import { ThemeToggle } from "@/components/widgets/theme-toggle"; import UserNav from "@/components/widgets/user-nav"; import { cn } from "@/lib/utils"; import { useSession } from "next-auth/react"; import Image from "next/image"; import Link from "next/link"; import { usePathname } from "next/navigation"; import React from "react"; // const NavbarLogin = ({ // session, // status, // }: { // session: Session | null; // status: "authenticated" | "loading" | "unauthenticated"; // }) => { // if (status === "loading") return ; // return session ? ( // // ) : ( // // } // /> // ); // }; type NavLinkProps = { href: string; title: string; Icon: Icon; }; const NavLink = ({ href, title, Icon }: NavLinkProps) => { const path = usePathname(); return (
{title}
); }; const Navbar = ({ className, ...props }: React.HTMLAttributes) => { const { data: session, status } = useSession(); return (
{status !== "loading" && (session ? ( ) : ( ))}
// ); }; export default Navbar;