-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #146 from CHZZK-Study/feat/address-page
Feat: 주소 목록페이지 생성
- Loading branch information
Showing
27 changed files
with
533 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export interface AddresDetail { | ||
name: string, | ||
phoneNumber: string, | ||
zonecode: string, | ||
address: string, | ||
addressDetail: string, | ||
defaultAddress: string, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import PriceIcon from '@/assets/icons/price.svg'; | ||
|
||
const CreatedAt = ({ createAt }: { createAt: string }) => { | ||
const date = new Date(createAt); | ||
const year = date.getFullYear(); | ||
const month = String(date.getMonth() + 1).padStart(2, '0'); | ||
const day = String(date.getDate()).padStart(2, '0'); | ||
|
||
const formattedDate = `${year}년 ${month}월 ${day}일`; | ||
|
||
return ( | ||
<div | ||
aria-label="마감된 날짜" | ||
className="flex items-center text-xs sm:text-body2 text-gray2" | ||
> | ||
<img src={PriceIcon} alt="마감된 날짜" /> | ||
<span className='whitespace-nowrap'> | ||
{`마감된 날짜 `} | ||
<span className="text-xs text-black sm:text-body2Bold">{formattedDate}</span> | ||
</span> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CreatedAt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import ProductItem from '../common/item/ProductItem'; | ||
import type { IAuctionEndRegisteredItem } from 'AuctionItem'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import MinPrice from '../common/atomic/MinPrice'; | ||
import ParticipantCount from '../common/atomic/ParticipantCount'; | ||
import { formatCurrencyWithWon } from '@/utils/formatCurrencyWithWon'; | ||
import CreatedAt from '../common/atomic/CreatedAt'; | ||
|
||
const EndMyRegister = ({ product }: { product: IAuctionEndRegisteredItem }) => { | ||
const navigate = useNavigate(); | ||
const winningBidAmount = product.winningBidAmount ?? 0; | ||
const formattedWinningBid = formatCurrencyWithWon(winningBidAmount); | ||
|
||
return ( | ||
<ProductItem product={product} onClick={() => navigate(`/auctions/bid/${product.auctionId}`)}> | ||
<MinPrice price={product.minPrice} /> | ||
<ParticipantCount count={product.participantCount} /> | ||
<div | ||
aria-label="낙찰 금액" | ||
className="flex items-center text-xs sm:text-body2 text-gray2" | ||
> | ||
<img alt="참여자" /> | ||
<span className='whitespace-nowrap'> | ||
낙찰 금액 <span className="text-xs text-black sm:text-body2Bold">{formattedWinningBid}</span> | ||
</span> | ||
</div> | ||
<div | ||
aria-label="참여자" | ||
className="flex items-center text-xs sm:text-body2 text-gray2" | ||
> | ||
<img alt="참여자" /> | ||
<span className='whitespace-nowrap'> | ||
낙찰 여부 <span className="text-xs text-black sm:text-body2Bold">{product.isWon ? '낙찰' : '유찰'}</span> | ||
</span> | ||
</div> | ||
<div | ||
aria-label="참여자" | ||
className="flex items-center text-xs sm:text-body2 text-gray2" | ||
> | ||
<img alt="참여자" /> | ||
<span className='whitespace-nowrap'> | ||
결제 여부 <span className="text-xs text-black sm:text-body2Bold">{product.isPaid ? '결제 완료' : '미결제'}</span> | ||
</span> | ||
</div> | ||
<CreatedAt createAt={product.createAt} /> | ||
</ProductItem> | ||
); | ||
}; | ||
|
||
export default EndMyRegister; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.