apps/web: bottom navbar only for first-level pages

This commit is contained in:
vchikalkin 2025-01-29 11:53:48 +03:00
parent 87d327fe9f
commit c8a602db05

View File

@ -1,7 +1,14 @@
'use client';
import { NavButton } from './nav-button';
import { BookOpen, Newspaper, PlusCircle, User, Users } from 'lucide-react';
import { usePathname } from 'next/navigation';
export function BottomNav() {
const pathname = usePathname();
const isFirstLevel = pathname.split('/').length <= 2;
if (!isFirstLevel) return null;
return (
<nav className="fixed inset-x-0 bottom-0 border-t border-border bg-background">
<div className="grid grid-cols-5">