add footer
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user