Skip to content

Commit

Permalink
fix: 대기열 페이지에서 receiptId를 조회하지 못하는 버그 수정 (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
yudonggeun authored Aug 29, 2024
1 parent 963458e commit df5223b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion front/src/api/auction/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async function requestAuctionBid(
baseUrl: string,
auctionId: number,
request: AuctionPurchaseRequest,
onSuccess: (uuid: string) => void,
onSuccess: (uuid: number) => void,
onFailure: (message: string) => void
) {
try {
Expand Down
2 changes: 1 addition & 1 deletion front/src/api/auction/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface AuctionsRequest {
}

interface AuctionBidResponse {
uuid: string;
uuid: number;
message: string;
errorCode: string;
}
Expand Down
3 changes: 3 additions & 0 deletions front/src/pages/auction/detail/AuctionDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ import useAlert from "../../../hooks/useAlert";
import {getAuctionProgress} from "../../../util/NumberUtil"
import arrowLeftIcon from '../../../img/arrow-left.svg';
import Confetti from 'react-confetti';
import {useReceiptStore} from "../../../store/ReceiptStore";


function AuctionDetail({auctionId}: { auctionId?: number }) {

const {currentPage, setPage} = usePageStore();
const {receiptId, setReceiptId} = useReceiptStore();
const baseUrl = process.env.REACT_APP_API_URL || ''
const {showAlert} = useAlert();
const [auction, setAuction] = useState<AuctionDetailInfo | null>(null);
Expand Down Expand Up @@ -200,6 +202,7 @@ function AuctionDetail({auctionId}: { auctionId?: number }) {
setIsButtonDisabled(true); // 버튼 비활성화
setCountdown(5); // 5초 카운트다운 시작
setPage('waiting');
setReceiptId(uuid);
},
(message) => {
showAlert(message);
Expand Down

0 comments on commit df5223b

Please sign in to comment.