Skip to content

Commit

Permalink
fix: 캔슬 캐시 데이터 알맞게 가져오기
Browse files Browse the repository at this point in the history
  • Loading branch information
imddoy committed Dec 15, 2024
1 parent 59c7675 commit 3c729e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/pages/cancel/Cancel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ const Cancel = () => {
const { setHeader } = useHeader();
const { openAlert } = useModal();
const { state } = useLocation();
const { confirmCancelAction } = useCancelBooking(
state?.bookerName,
state?.number,
state?.password
);
const { confirmCancelAction } = useCancelBooking(state?.name, state?.phone, state?.password);
const navigate = useNavigate();
const [isDeposit, setIsDeposit] = useState<boolean | null>(null);
const [bankOpen, setBankOpen] = useState(false);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/lookup/Lookup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ const Lookup = () => {
};

useEffect(() => {
if (state?.name && state?.phone && state?.password && !cachedData && !isFetching) {
// 비회원 데이터가 캐시에 없을 경우 새로 가져옴
if (state?.name && state?.phone && state?.password && !isFetching) {
// 비회원 데이터 새로 가져옴
fetchBookingList(state).finally(() => {
setIsFetching(false);
setCachedData(getCachedBookingList(state.name, state.phone, state.password));
Expand Down

0 comments on commit 3c729e6

Please sign in to comment.