Skip to content

Commit 3d83c7e

Browse files
committed
fix: 대시보드 페이지 이동시 id값 prop 받도록 수정
1 parent 8c0ec80 commit 3d83c7e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/pages/menu/ui/myHost/MyHostPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const MyHostPage = () => {
3535
{hostDetail?.result?.events?.map(event => (
3636
<EventCard
3737
key={event.id}
38+
id={event.id}
3839
img={event.bannerImageUrl}
3940
eventTitle={event.title}
4041
// dDay={event.dDay}

src/shared/ui/EventCard.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import TertiaryButton from '../../../design-system/ui/buttons/TertiaryButton';
33
import Countdown from '../../../design-system/ui/texts/Countdown';
44

55
interface EventCardProps {
6+
id: number;
67
img: string;
78
eventTitle: string;
89
dDay?: string;
@@ -13,7 +14,7 @@ interface EventCardProps {
1314
onClick?: () => void;
1415
}
1516

16-
const EventCard = ({ img, eventTitle, dDay, host, eventDate, location, hashtags, onClick }: EventCardProps) => {
17+
const EventCard = ({ id, img, eventTitle, dDay, host, eventDate, location, hashtags, onClick }: EventCardProps) => {
1718
const navigate = useNavigate();
1819
const { pathname } = useLocation();
1920

@@ -52,7 +53,7 @@ const EventCard = ({ img, eventTitle, dDay, host, eventDate, location, hashtags,
5253
size="small"
5354
onClick={event => {
5455
event?.stopPropagation();
55-
navigate('/dashboard');
56+
navigate(`/dashboard/${id}`);
5657
}}
5758
className="w-31.5 md:w-33 mt-2"
5859
/>

0 commit comments

Comments
 (0)