diff --git a/client/src/components/StepList/Step.tsx b/client/src/components/StepList/Step.tsx index aead2f37c..b8c0813be 100644 --- a/client/src/components/StepList/Step.tsx +++ b/client/src/components/StepList/Step.tsx @@ -1,5 +1,5 @@ /** @jsxImportSource @emotion/react */ -import {useNavigate} from 'react-router-dom'; +import {useMatch, useNavigate} from 'react-router-dom'; import {css} from '@emotion/react'; import Amount from '@components/Design/components/Amount/Amount'; diff --git a/client/src/pages/EventPage/HomePage/HomePage.tsx b/client/src/pages/EventPage/HomePage/HomePage.tsx index 4314d9592..f8a205ef6 100644 --- a/client/src/pages/EventPage/HomePage/HomePage.tsx +++ b/client/src/pages/EventPage/HomePage/HomePage.tsx @@ -1,6 +1,6 @@ import type {EventPageContextProps} from '../EventPageLayout'; -import {useNavigate, useOutletContext} from 'react-router-dom'; +import {useMatch, useNavigate, useOutletContext} from 'react-router-dom'; import StepList from '@components/StepList/Steps'; import useRequestGetSteps from '@hooks/queries/step/useRequestGetSteps'; @@ -13,10 +13,14 @@ import {Icon, Tab, Tabs, Title} from '@HDesign/index'; import getEventIdByUrl from '@utils/getEventIdByUrl'; +import {ROUTER_URLS} from '@constants/routerUrls'; + import {receiptStyle} from './HomePage.style'; const HomePage = () => { const {isAdmin, eventName} = useOutletContext(); + const isInHomePage = useMatch(ROUTER_URLS.home) !== null; + const {steps} = useRequestGetSteps(); const {totalExpenseAmount} = useTotalExpenseAmountStore(); const {images} = useRequestGetImages(); @@ -38,7 +42,7 @@ const HomePage = () => { /> } /> - } /> + } /> );