From 396cd0163f3b2da08ee5c1839f7da9571e3ee2ca Mon Sep 17 00:00:00 2001 From: jimin Date: Sat, 27 Jan 2024 20:05:19 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=90=9B=20fix=20:=20=EB=A6=AC=EB=B7=B0?= =?UTF-8?q?=20=EC=95=84=EC=9D=B4=ED=85=9C=20key=EA=B0=92=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/home/review/reviewSwiper/index.tsx | 6 +++--- components/review/InfiniteScrollWrapper/index.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/home/review/reviewSwiper/index.tsx b/components/home/review/reviewSwiper/index.tsx index 65b68d0b..b766dc02 100644 --- a/components/home/review/reviewSwiper/index.tsx +++ b/components/home/review/reviewSwiper/index.tsx @@ -13,11 +13,11 @@ const ReviewSwiper = () => { if (isLoading) return ; return ( - {data?.list.map((item: ReviewItemType) => { + {data?.list.map((item: ReviewItemType, index: number) => { return ( - + { {data ? ( data.pages.map((page, pageIndex) => (
- {page.list.map((item: ReviewItemType) => ( + {page.list.map((item: ReviewItemType, index: number) => ( Date: Sat, 27 Jan 2024 20:35:43 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=ED=8C=90=EB=A7=A4=20?= =?UTF-8?q?=EC=99=84=EB=A3=8C=20=EC=83=81=ED=83=9C=EC=97=90=EC=84=9C?= =?UTF-8?q?=EB=A7=8C=20=EB=A6=AC=EB=B7=B0=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/mypage/items/sellingItems/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mypage/items/sellingItems/index.tsx b/components/mypage/items/sellingItems/index.tsx index d5776df2..209f740e 100644 --- a/components/mypage/items/sellingItems/index.tsx +++ b/components/mypage/items/sellingItems/index.tsx @@ -99,7 +99,7 @@ const MItem = ({ item }: { item: MypageSellingType }) => {
- {item && item.dealState && ( + {item && item.dealState === 'DONEDEAL' && ( Date: Sat, 27 Jan 2024 21:38:06 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=ED=8C=90=EB=A7=A4=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=EC=97=90=20=EB=94=B0=EB=A5=B8=20=EB=AC=B8?= =?UTF-8?q?=EA=B5=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mypage/items/sellingItems/index.tsx | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/components/mypage/items/sellingItems/index.tsx b/components/mypage/items/sellingItems/index.tsx index 209f740e..e8f4eede 100644 --- a/components/mypage/items/sellingItems/index.tsx +++ b/components/mypage/items/sellingItems/index.tsx @@ -10,6 +10,7 @@ import { useSetRecoilState } from 'recoil'; import { isProductState } from '@/atoms/sale/productAtom'; import { getReviewState, getSellState } from '@/utils/mypage-utils'; import ReEnrollButton from '../reEnrollButton'; +import { getDotDate } from '@/utils/get-dot-date'; const MItem = ({ item }: { item: MypageSellingType }) => { const setIsProduct = useSetRecoilState(isProductState); @@ -31,6 +32,25 @@ const MItem = ({ item }: { item: MypageSellingType }) => { // 게시만료일때만 => 판매완료, 기한만료, 판매불가 따지기 const isNothing = item?.dealState ? true : false; + const renderDealState = (dealState: string) => { + switch (dealState) { + case 'EXPIRED': + return ( + <> +

{getSellState(dealState)}

+ + + ); + case 'DONEDEAL': + return

판매완료

; + case 'UNSOLD': + case 'UNABLESELL': + return

{getSellState(dealState)}

; + default: + return

게시만료일 ~ {getDotDate(item.endDate, true, true, true)}

; + } + }; + return (
@@ -64,6 +84,7 @@ const MItem = ({ item }: { item: MypageSellingType }) => { 캐치특가 )} + s
{/* 호텔 이름과 가격 정보 */}
@@ -90,11 +111,7 @@ const MItem = ({ item }: { item: MypageSellingType }) => {
-

{getSellState(item.dealState as string)}

- + {renderDealState(item.dealState as string)}
From e85de56e9e63bf13b49a79af55a3908bc9591406 Mon Sep 17 00:00:00 2001 From: minseokiim Date: Sat, 27 Jan 2024 22:55:45 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=ED=8C=90=EB=A7=A4=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=EC=97=90=20=EB=94=B0=EB=A5=B8=20=EB=AC=B8?= =?UTF-8?q?=EA=B5=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/mypage/items/sellingItems/index.tsx | 2 +- utils/mypage-utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/mypage/items/sellingItems/index.tsx b/components/mypage/items/sellingItems/index.tsx index e8f4eede..0a50a1b0 100644 --- a/components/mypage/items/sellingItems/index.tsx +++ b/components/mypage/items/sellingItems/index.tsx @@ -42,7 +42,7 @@ const MItem = ({ item }: { item: MypageSellingType }) => { ); case 'DONEDEAL': - return

판매완료

; + return

판매일 : {getDotDate(item.endDate, true, true, true)}

; case 'UNSOLD': case 'UNABLESELL': return

{getSellState(dealState)}

; diff --git a/utils/mypage-utils.ts b/utils/mypage-utils.ts index 480a2b49..213262e6 100644 --- a/utils/mypage-utils.ts +++ b/utils/mypage-utils.ts @@ -35,7 +35,7 @@ export const noMask = (value: string) => { export const getSellState = (state: string) => { switch (state) { case 'EXPIRED': - return '기한 만료'; + return '게시 기한 만료'; case 'UNSOLD': return '체크인 만료'; case 'UNABLESELL':