Skip to content

Commit

Permalink
feat: 경매 상세 페이지 뒤로가기 버튼 동작 수정 (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
yudonggeun authored Aug 26, 2024
1 parent c9f49ca commit 609b07b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion front/src/pages/auction/detail/AuctionDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ function AuctionDetail({auctionId}: { auctionId?: number }) {
);
}

const onClickBackButton = () => {
setPage('home');
}

if (auction === null) {
return <div className="container mx-auto p-6">
<div className="max-w-lg mx-auto bg-white shadow-lg rounded-lg overflow-hidden">
Expand All @@ -94,7 +98,7 @@ function AuctionDetail({auctionId}: { auctionId?: number }) {
<div className="fixed top-0 left-0 right-0 bg-white shadow-lg p-2 flex items-center justify-center z-50">
<button
className="absolute left-2 bg-white border-none p-2"
onClick={() => window.location.href = '/'}
onClick={onClickBackButton}
>
<img src={arrowLeftIcon} alt="뒤로가기" className="w-5 h-5"/>
</button>
Expand Down

0 comments on commit 609b07b

Please sign in to comment.