Skip to content

Commit 781c061

Browse files
committed
♻️ refactor:예매내역 완료 후 내 정보 갱신
Issue Resolved: #
1 parent 9006747 commit 781c061

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

front/src/components/Navbar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export default function Navbar() {
8383
)}>
8484
<h3 className="px-4 text-left text-heading3">예매 현황</h3>
8585
<Separator direction="row" />
86-
<div className="flex max-h-[800px] flex-col gap-6 overflow-y-scroll pr-4">
86+
<div className="flex max-h-[800px] flex-grow flex-col justify-center gap-6 overflow-y-scroll pr-4">
8787
{isReservation ? (
8888
reservations.map((reservation) => (
8989
<ReservationCard

front/src/pages/ReservationPage/SectionAndSeat.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { padEndArray } from '@/utils/padArray.ts';
1515

1616
import { API } from '@/constants/index.ts';
1717
import type { EventDetail, PlaceInformation, Section, SectionCoordinate } from '@/type/index.ts';
18-
import { useMutation, useMutationState } from '@tanstack/react-query';
18+
import { useMutation, useMutationState, useQueryClient } from '@tanstack/react-query';
1919
import { cx } from 'class-variance-authority';
2020
import { twMerge } from 'tailwind-merge';
2121

@@ -69,6 +69,7 @@ export default function SectionAndSeat({
6969
},
7070
select: (mutation) => mutation.state.variables as PostSeatData,
7171
});
72+
const queryClient = useQueryClient();
7273
//TODO 길이 모음 필요 , 상태 관리 필용, 상태 reducer로 변경 필요, pending 중인 state 추출 필요
7374
const { layout } = placeInformation;
7475
const { overview, overviewHeight, overviewPoints, overviewWidth, sections } = layout;
@@ -216,6 +217,7 @@ export default function SectionAndSeat({
216217
{
217218
onSuccess: () => {
218219
setReservationResult(selectedSeats);
220+
queryClient.refetchQueries({ queryKey: ['reservation'] });
219221
goNextStep();
220222
},
221223
},

0 commit comments

Comments
 (0)