From 33148793074dda39e43ad0b4c64128273862d84b Mon Sep 17 00:00:00 2001 From: chaeneey <127743435+chaeneey@users.noreply.github.com> Date: Mon, 23 Sep 2024 01:26:41 +0900 Subject: [PATCH] =?UTF-8?q?[Fix/#325]=20=EC=A7=84=EC=A7=9C=20=EB=A7=88?= =?UTF-8?q?=EC=A7=80=EB=A7=89=20QA=20(#326)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Home에서 bannerId 있을 때만 bannerList map 돌고, 없을 땐 배너 1개만 보여주기 * fix: 엠티뷰 텍스트 '전체' 부분 추가 -> switch 문으로 바꾸기 --- .../guest/page/GuestMyClass/GuestMyClass.tsx | 19 +++++++++++++++--- src/pages/home/page/Home/Home.tsx | 20 ++++++++++++------- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/pages/guest/page/GuestMyClass/GuestMyClass.tsx b/src/pages/guest/page/GuestMyClass/GuestMyClass.tsx index 91d634bb..009ceadb 100644 --- a/src/pages/guest/page/GuestMyClass/GuestMyClass.tsx +++ b/src/pages/guest/page/GuestMyClass/GuestMyClass.tsx @@ -64,6 +64,21 @@ const GuestMyClass = () => { '환불 완료': currentData?.filter((data) => data.moimSubmissionState === 'refunded'), }; + const GuestMyClassEmptyViewText = (state: string) => { + switch (state) { + case '전체': { + return '아직 신청한 클래스가 없어요'; + } + case '입금 대기': + case '승인 대기': { + return `${state} 중인 클래스가 없어요`; + } + default: { + return `${state}된 클래스가 없어요`; + } + } + }; + if (isApplyLoading || isParticipateLoading) { return ; } @@ -112,9 +127,7 @@ const GuestMyClass = () => { diff --git a/src/pages/home/page/Home/Home.tsx b/src/pages/home/page/Home/Home.tsx index 86c2b1a3..ff0c0d7e 100644 --- a/src/pages/home/page/Home/Home.tsx +++ b/src/pages/home/page/Home/Home.tsx @@ -84,13 +84,19 @@ const Home = () => { modules={[Pagination]} loop={true} className="mySwiper"> - {bannerList.map((banner, index) => { - return ( - handleBannerClick(index)}> - - - ); - })} + {bannerId ? ( + bannerList.map((banner, index) => { + return ( + handleBannerClick(index)}> + + + ); + }) + ) : ( + handleBannerClick(1)}> + + + )}