From 01baf090f297fee2f515897075060b17a88bdaac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=ED=98=84=EC=A1=B0?= Date: Mon, 9 Sep 2024 14:58:12 +0900 Subject: [PATCH] =?UTF-8?q?Refactor:=20=ED=97=A4=EB=8D=94=EA=B0=80=20?= =?UTF-8?q?=EB=A9=94=EC=9D=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=EC=9D=BC=20?= =?UTF-8?q?=EB=95=8C=20=EB=84=A4=EB=B9=84=EA=B2=8C=EC=9D=B4=ED=8A=B8?= =?UTF-8?q?=EB=82=98=20=EB=8B=A4=EB=A5=B8=20=EC=95=84=EC=9D=B4=EC=BD=98?= =?UTF-8?q?=EC=9D=B4=20=EC=95=88=20=EB=9C=A8=EB=8F=84=EB=A1=9D=20=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/Header/index.tsx | 37 ++++++++++++++++-------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/Header/index.tsx b/frontend/src/components/Header/index.tsx index 62fd29a..b85b136 100644 --- a/frontend/src/components/Header/index.tsx +++ b/frontend/src/components/Header/index.tsx @@ -1,10 +1,15 @@ import * as React from 'react'; import { cn } from '@/lib/utils'; import { Bell, User } from 'lucide-react'; +import { useLocation } from 'react-router-dom'; export interface HeaderProps extends React.HTMLAttributes {} export default function Header({ className, ...props }: HeaderProps) { + const location = useLocation(); + + const isHomePage = location.pathname === '/'; + return (
WorLabel - - -
- - + + {!isHomePage && ( + + )}
+ + {!isHomePage && ( +
+ + +
+ )}
); }