From b9ca36c412c0d9d9e1e1219954c62b7788ec0717 Mon Sep 17 00:00:00 2001 From: NohWookJin Date: Fri, 26 Jan 2024 15:34:46 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=8B=A4=EA=B0=80=EC=98=A4?= =?UTF-8?q?=EB=8A=94=20=EC=97=AC=ED=96=89=20=EC=97=86=EC=9D=84=EC=8B=9C=20?= =?UTF-8?q?=ED=83=80=EC=9D=B4=ED=8B=80=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/MyTrip/MyTripBeforeList.tsx | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/components/MyTrip/MyTripBeforeList.tsx b/src/components/MyTrip/MyTripBeforeList.tsx index 88dc770f..29ff4b81 100644 --- a/src/components/MyTrip/MyTripBeforeList.tsx +++ b/src/components/MyTrip/MyTripBeforeList.tsx @@ -12,18 +12,22 @@ const MyTripBeforeList: React.FC = ({ myTripsData }) => { return
데이터를 불러오는 중 오류가 발생했습니다.
; } - return ( - <> -
-

다가오는 여행

-
-
- {myTripsData.map((myTripList: MyTripType) => ( - - ))} -
- - ); + if (myTripsData.length > 0) { + return ( + <> +
+

다가오는 여행

+
+
+ {myTripsData.map((myTripList: MyTripType) => ( + + ))} +
+ + ); + } else { + return null; + } }; export default MyTripBeforeList;