From 620bad791543df0754d14bfd96f5c1f57da6c721 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Johan=20Mej=C3=ADa?=
<109983506+JohanMejia77@users.noreply.github.com>
Date: Tue, 3 Oct 2023 16:48:07 -0500
Subject: [PATCH] Update container_page.tsx
Fixed bug of categories navbar
---
src/app/container_page.tsx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/app/container_page.tsx b/src/app/container_page.tsx
index f4e222e..158a328 100644
--- a/src/app/container_page.tsx
+++ b/src/app/container_page.tsx
@@ -1,6 +1,8 @@
+'use client'
import Footer from '~/components/footer/Footer';
import NavBar from '~/components/navBar/navBar';
import Categories from '~/components/categories/categories';
+import { usePathname } from 'next/navigation';
type ContainerPageProps = {
children: React.ReactNode;
@@ -15,12 +17,13 @@ export function ContainerPage({
footer = true,
children,
}: ContainerPageProps) {
+ const pathname = usePathname();
return (
<>
{typeof nav === 'boolean' && nav ? : nav}
{header && header}
-
+ {pathname !== '/' && }
{children}
{footer && }