From fc9415a27df0fd53d45b5d5fab21adb5646b515a Mon Sep 17 00:00:00 2001 From: jhj2713 Date: Wed, 31 Jul 2024 14:13:39 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=ED=97=A4=EB=8D=94=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=20=EB=9D=BC=EC=9A=B0=ED=8C=85=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EB=B0=8F=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/Header/index.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/client/src/components/Header/index.tsx b/client/src/components/Header/index.tsx index 701d8e80..8e4e7ca2 100644 --- a/client/src/components/Header/index.tsx +++ b/client/src/components/Header/index.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from "react"; -import { useLocation } from "react-router-dom"; +import { Link, useLocation } from "react-router-dom"; import ButtonHeader from "../ButtonHeader"; import { backgroundBlurVariants, logoVariants } from "./index.style"; @@ -9,7 +9,7 @@ export interface HeaderProps { const EVENT_TYPE = { LOTTERY: "lottery", - FIRST_COME: "first-come", + RUSH: "rush", }; type EventType = (typeof EVENT_TYPE)[keyof typeof EVENT_TYPE]; @@ -21,8 +21,8 @@ export default function Header({ type }: HeaderProps) { const pathname = location.pathname; const selectedEventType = pathname.startsWith(`/${EVENT_TYPE.LOTTERY}`) ? EVENT_TYPE.LOTTERY - : pathname === "/balance" - ? EVENT_TYPE.FIRST_COME + : pathname === "/rush" + ? EVENT_TYPE.RUSH : ""; setSelectedEvent(selectedEventType); }, [location]); @@ -31,7 +31,9 @@ export default function Header({ type }: HeaderProps) {
-

CASPER Electric Event

+ + CASPER Electric Event +
선착순 밸런스 게임 From 6508d9ed4bac72133c71c67d8a046292863d3025 Mon Sep 17 00:00:00 2001 From: jhj2713 Date: Wed, 31 Jul 2024 15:38:42 +0900 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20=EC=83=81=EC=88=98=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/Header/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/Header/index.tsx b/client/src/components/Header/index.tsx index 8e4e7ca2..6bb90bfe 100644 --- a/client/src/components/Header/index.tsx +++ b/client/src/components/Header/index.tsx @@ -21,7 +21,7 @@ export default function Header({ type }: HeaderProps) { const pathname = location.pathname; const selectedEventType = pathname.startsWith(`/${EVENT_TYPE.LOTTERY}`) ? EVENT_TYPE.LOTTERY - : pathname === "/rush" + : pathname.startsWith(`/${EVENT_TYPE.RUSH}`) ? EVENT_TYPE.RUSH : ""; setSelectedEvent(selectedEventType);