Skip to content

Commit

Permalink
[refactor]: 선물함 페이지 'from. 나' 텍스트 추가 (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
uraflower committed Jun 22, 2024
1 parent 8c7afa0 commit e1e6440
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/layouts/MyPage/GiftBox/GiftItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const GiftItem = ({ gift, status }: GiftItemProps) => {
brandName,
productName,
productThumbnail,
self,
senderName,
expiredAt,
receivedAt,
Expand Down Expand Up @@ -41,7 +42,7 @@ const GiftItem = ({ gift, status }: GiftItemProps) => {
<div className={styles.wrapper_receive_info}>
<span className={styles.txt_sender}>
<span className={styles.txt_from}>from. </span>
{senderName}
{self ? '나' : senderName}
</span>
<span className={styles.txt_date}>
{new Date(receivedAt).toLocaleString()}
Expand Down
1 change: 1 addition & 0 deletions src/mocks/giftHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const gifts: Gift[] = Array.from({ length: 50 }).map((_, i) => ({
productName: `사용가능 상품${i}`,
productThumbnail:
'https://img1.kakaocdn.net/thumb/[email protected]/?fname=https%3A%2F%2Fst.kakaocdn.net%2Fproduct%2Fgift%2Fproduct%2F20201230180133_cd30cb29560f4f1f8c7f380eb94e3cf1.png',
self: false,
senderName: '홍길동',
receivedAt: '2022-05-23T23:59:59',
expiredAt: '2024-12-31T23:59:59',
Expand Down
1 change: 1 addition & 0 deletions src/stories/GiftItem.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const giftData: Gift = {
productName: '상품',
productThumbnail:
'https://img1.kakaocdn.net/thumb/[email protected]/?fname=https%3A%2F%2Fst.kakaocdn.net%2Fproduct%2Fgift%2Fproduct%2F20201230180133_cd30cb29560f4f1f8c7f380eb94e3cf1.png',
self: false,
senderName: '홍길동',
receivedAt: '2022-05-23T23:59:59',
expiredAt: '2024-12-31T23:59:59',
Expand Down
1 change: 1 addition & 0 deletions src/types/Gift.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type Gift = {
brandName: string;
productName: string;
productThumbnail: string;
self: boolean;
senderName: string;
receivedAt: string;
expiredAt: string;
Expand Down

0 comments on commit e1e6440

Please sign in to comment.