Skip to content

Commit be98d74

Browse files
committed
design: 오고 있는 편지 모달에서 데이터가 없을 때 대체 텍스트 추가
1 parent 4330424 commit be98d74

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/pages/Home/components/ShowIncomingLettersModal.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,19 @@ const ShowIncomingLettersModal = ({ onClose }: ShowIncomingLettersModalProps) =>
2929
<p className="caption-r text-black">시간은 실제 시간을 기반으로 책정됩니다.</p>
3030
</div>
3131
<div className="mt-6 flex max-h-60 min-h-auto w-[251px] flex-col gap-[10px] overflow-y-scroll [&::-webkit-scrollbar]:hidden">
32-
{data.map((letter) => (
33-
<div
34-
className="text-gray-80 body-m flex h-10 w-full items-center justify-between gap-1 rounded-lg bg-white p-3"
35-
key={letter.letterId}
36-
>
37-
<p className="truncate">{letter.title}</p>
38-
<p>{letter.remainingTime}</p>
39-
</div>
40-
))}
32+
{data.length > 0 ? (
33+
data.map((letter) => (
34+
<div
35+
className="text-gray-80 body-m flex h-10 w-full items-center justify-between gap-1 rounded-lg bg-white p-3"
36+
key={letter.letterId}
37+
>
38+
<p className="truncate">{letter.title}</p>
39+
<p>{letter.remainingTime}</p>
40+
</div>
41+
))
42+
) : (
43+
<p className="caption-m text-center text-gray-50">오고 있는 편지가 없어요</p>
44+
)}
4145
</div>
4246
</ModalBackgroundWrapper>
4347
</div>

0 commit comments

Comments
 (0)