From 536f96960d969088ad7d63c14c9e876e24c6da18 Mon Sep 17 00:00:00 2001 From: Mattia Magi Date: Tue, 25 Jul 2023 10:42:31 +0200 Subject: [PATCH] enhance header styles like in the remix project --- app/compoents/Header.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/compoents/Header.tsx b/app/compoents/Header.tsx index 2db57e2..9d31320 100644 --- a/app/compoents/Header.tsx +++ b/app/compoents/Header.tsx @@ -6,6 +6,7 @@ import { Drawer } from '@/components/Drawer'; import { ShopifyHeaderMenu } from '@/lib/shopify/types'; import { Cart } from '@/components/Cart'; import useAppStore from '@/store/app-store'; +import { usePathname } from 'next/navigation'; function Header({ menu, @@ -16,7 +17,8 @@ function Header({ title: string; isUser: boolean; }) { - const isHome = true; + const pathname = usePathname(); + const isHome = pathname === '/'; return ( <>