Skip to content

Commit

Permalink
refactor: 다가오는 여행 없을시 타이틀 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
NohWookJin committed Jan 26, 2024
1 parent e9a3b81 commit b9ca36c
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/components/MyTrip/MyTripBeforeList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,22 @@ const MyTripBeforeList: React.FC<MyTripIngListProps> = ({ myTripsData }) => {
return <div>데이터를 불러오는 중 오류가 발생했습니다.</div>;
}

return (
<>
<div className="mb-[10px] mt-[30px]">
<h1 className="text-[18px] font-bold text-gray7">다가오는 여행</h1>
</div>
<div className="no-scrollbar grid grid-cols-1 gap-[5px] overflow-y-scroll">
{myTripsData.map((myTripList: MyTripType) => (
<MyTripItem key={uuidv4()} myTripList={myTripList} />
))}
</div>
</>
);
if (myTripsData.length > 0) {
return (
<>
<div className="mb-[10px] mt-[30px]">
<h1 className="text-[18px] font-bold text-gray7">다가오는 여행</h1>
</div>
<div className="no-scrollbar grid grid-cols-1 gap-[5px] overflow-y-scroll">
{myTripsData.map((myTripList: MyTripType) => (
<MyTripItem key={uuidv4()} myTripList={myTripList} />
))}
</div>
</>
);
} else {
return null;
}
};

export default MyTripBeforeList;

0 comments on commit b9ca36c

Please sign in to comment.