add footer

This commit is contained in:
Randa Firman Putra
2025-12-07 23:25:23 +07:00
parent e7154a893d
commit 29dd0ed4ab
2 changed files with 27 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import { usePathname } from 'next/navigation';
import { ThemeProvider } from '@/components/theme-provider';
import { Toaster } from '@/components/ui/toaster';
import Navbar from '@/components/ui/Navbar';
import Footer from '@/components/ui/footer';
interface ClientLayoutProps {
children: React.ReactNode;
@@ -41,8 +42,9 @@ export default function ClientLayout({ children }: ClientLayoutProps) {
}
};
// Don't show navbar on the root page (login page)
// Don't show navbar and footer on the root page (login page)
const showNavbar = pathname !== '/' && !isLoading;
const showFooter = pathname !== '/' && !isLoading;
return (
<ThemeProvider
@@ -51,11 +53,12 @@ export default function ClientLayout({ children }: ClientLayoutProps) {
enableSystem={false}
disableTransitionOnChange
>
<div className="min-h-screen">
<div className="min-h-screen flex flex-col">
{showNavbar && <Navbar />}
<main className="flex-1">
{children}
</main>
{showFooter && <Footer />}
</div>
<Toaster />
</ThemeProvider>