diff --git a/app/(dashboard)/u/[username]/_components/sidebar/nav-item.tsx b/app/(dashboard)/u/[username]/_components/sidebar/nav-item.tsx index b1a6991..d1eb29b 100644 --- a/app/(dashboard)/u/[username]/_components/sidebar/nav-item.tsx +++ b/app/(dashboard)/u/[username]/_components/sidebar/nav-item.tsx @@ -45,8 +45,8 @@ export const NavItem = ({ export const NavItemSkeleton = () => { return (
  • - -
    + +
  • diff --git a/app/(dashboard)/u/[username]/_components/sidebar/navigation.tsx b/app/(dashboard)/u/[username]/_components/sidebar/navigation.tsx index 2d8539c..45a76ba 100644 --- a/app/(dashboard)/u/[username]/_components/sidebar/navigation.tsx +++ b/app/(dashboard)/u/[username]/_components/sidebar/navigation.tsx @@ -3,7 +3,7 @@ import { useUser } from "@clerk/nextjs"; import { Fullscreen, KeyRound, MessageSquare, Users } from "lucide-react"; import { usePathname } from "next/navigation"; -import { NavItem } from "./nav-item"; +import { NavItem, NavItemSkeleton } from "./nav-item"; export const Navigation = () => { const pathname = usePathname(); @@ -32,6 +32,16 @@ export const Navigation = () => { }, ]; + if (!user?.username) { + return ( + + ); + } + return (
    {routes.map((route) => (