@@ -8,6 +8,7 @@ import PageTitle from '@/components/PageTitle';
88import { chunkBox } from '@/utils/chunkBox' ;
99
1010import LetterBoxItem from './components/LetterBoxItem' ;
11+ import MenuButton from '@/components/MenuButton' ;
1112
1213const fetchMailLists = async ( ) => {
1314 const response = await getMailbox ( ) ;
@@ -38,56 +39,59 @@ const LetterBoxPage = () => {
3839 }
3940
4041 return (
41- < main className = "flex grow flex-col items-center px-5 pt-20" >
42- < PageTitle > 내 편지함</ PageTitle >
43- < div className = "w-full max-w-94" >
44- < p className = "body-sb mt-16 mb-[7px] place-self-start text-gray-50" >
45- 나와 연락한 사람들 { letterBox ?. length }
46- </ p >
47- < section className = "letter-box-bg flex grow flex-col items-center px-4 pt-5" >
48- < div className = "flex w-full flex-col gap-5" >
49- { isLoading ? (
50- < p className = "body-m text-gray-60 text-center" > 로딩중..</ p >
51- ) : letterBox . length > 0 ? (
52- chunkBox (
53- letterBox . map ( ( data : LetterBoxData , index ) => (
54- < LetterBoxItem
55- boxId = { data . letterMatchingId }
56- key = { index }
57- zipCode = { data . oppositeZipCode }
58- letterCount = { data . letterCount }
59- isChecked = { data . oppositeRead }
60- isClosed = { ! data . active }
61- oppositeId = { data . oppositeId }
62- />
63- ) ) ,
64- ) . map ( ( row , index ) =>
65- row . length === 3 ? (
66- < div key = { index } className = "flex justify-between" >
67- { row }
68- </ div >
69- ) : (
70- < div key = { index } className = "flex justify-between" >
71- { row }
72- < img src = { ClosedWindowImg } alt = "닫힌 문 이미지" className = "h-28 w-23" />
73- { row . length === 1 && (
42+ < >
43+ < main className = "flex grow flex-col items-center px-5 pt-20" >
44+ < PageTitle > 내 편지함</ PageTitle >
45+ < div className = "w-full max-w-94" >
46+ < p className = "body-sb mt-16 mb-[7px] place-self-start text-gray-50" >
47+ 나와 연락한 사람들 { letterBox ?. length }
48+ </ p >
49+ < section className = "letter-box-bg flex grow flex-col items-center px-4 pt-5" >
50+ < div className = "flex w-full flex-col gap-5" >
51+ { isLoading ? (
52+ < p className = "body-m text-gray-60 text-center" > 로딩중..</ p >
53+ ) : letterBox . length > 0 ? (
54+ chunkBox (
55+ letterBox . map ( ( data : LetterBoxData , index ) => (
56+ < LetterBoxItem
57+ boxId = { data . letterMatchingId }
58+ key = { index }
59+ zipCode = { data . oppositeZipCode }
60+ letterCount = { data . letterCount }
61+ isChecked = { data . oppositeRead }
62+ isClosed = { ! data . active }
63+ oppositeId = { data . oppositeId }
64+ />
65+ ) ) ,
66+ ) . map ( ( row , index ) =>
67+ row . length === 3 ? (
68+ < div key = { index } className = "flex justify-between" >
69+ { row }
70+ </ div >
71+ ) : (
72+ < div key = { index } className = "flex justify-between" >
73+ { row }
7474 < img src = { ClosedWindowImg } alt = "닫힌 문 이미지" className = "h-28 w-23" />
75- ) }
76- </ div >
77- ) ,
78- )
79- ) : (
80- < p className = "body-m text-gray-60 text-center" > 아직 주고 받은 편지가 없어요</ p >
81- ) }
82- < div className = "flex justify-between" >
83- < img src = { ClosedWindowImg } alt = "닫힌 문 이미지" className = "h-28 w-23" />
84- < img src = { DoorImg } alt = "출입문 이미지" />
85- < img src = { ClosedWindowImg } alt = "닫힌 문 이미지" className = "h-28 w-23" />
75+ { row . length === 1 && (
76+ < img src = { ClosedWindowImg } alt = "닫힌 문 이미지" className = "h-28 w-23" />
77+ ) }
78+ </ div >
79+ ) ,
80+ )
81+ ) : (
82+ < p className = "body-m text-gray-60 text-center" > 아직 주고 받은 편지가 없어요</ p >
83+ ) }
84+ < div className = "flex justify-between" >
85+ < img src = { ClosedWindowImg } alt = "닫힌 문 이미지" className = "h-28 w-23" />
86+ < img src = { DoorImg } alt = "출입문 이미지" />
87+ < img src = { ClosedWindowImg } alt = "닫힌 문 이미지" className = "h-28 w-23" />
88+ </ div >
8689 </ div >
87- </ div >
88- </ section >
89- </ div >
90- </ main >
90+ </ section >
91+ </ div >
92+ </ main >
93+ < MenuButton />
94+ </ >
9195 ) ;
9296} ;
9397
0 commit comments