@@ -97,85 +97,77 @@ export default function EditInvitation() {
9797 : null
9898
9999 return (
100- < div >
101- < div className = "BG-white max-h-[360px] w-584 overflow-y-auto rounded-16 px-32 py-24" >
102- < PaginationHeader
103- currentPage = { currentPage }
104- totalPages = { totalPages }
105- title = "초대 내역"
106- onPrev = { handlePrev }
107- onNext = { handleNext }
100+ < div className = "BG-white w-full max-w-584 overflow-x-auto whitespace-nowrap rounded-16 px-32 py-24" >
101+ < PaginationHeader
102+ currentPage = { currentPage }
103+ totalPages = { totalPages }
104+ title = "초대 내역"
105+ onPrev = { handlePrev }
106+ onNext = { handleNext }
107+ >
108+ < button
109+ onClick = { ( ) => openModal ( 'invite' ) }
110+ className = "BG-violet flex w-fit shrink-0 items-center gap-8 rounded-5 px-12 py-6"
108111 >
109- < button
110- onClick = { ( ) => openModal ( 'invite' ) }
111- className = "BG-violet flex items-center gap-8 rounded-5 px-12 py-6"
112- >
113- < div className = "relative flex size-12" >
114- < Image src = "/images/invitation-white.png" fill alt = "초대 버튼" />
115- </ div >
116- < p className = "text-14 text-white" > 초대하기</ p >
117- </ button >
118- </ PaginationHeader >
119-
120- < form >
121- < label htmlFor = "title" className = "Text-black mb-8 block text-16" >
122- 이메일
123- </ label >
124- < div className = "flex flex-col gap-4" >
125- { isLoading && (
126- < p className = "Text-gray py-12 text-center" > 로딩 중...</ p >
127- ) }
128-
129- { errorMessage && (
130- < p className = "Text-blue py-12 text-center" > { errorMessage } </ p >
131- ) }
132-
133- { ! isLoading && ! errorMessage && currentItems . length === 0 && (
134- < p className = "Text-gray py-12 text-center" >
135- 초대된 사용자가 없습니다.
136- </ p >
137- ) }
138-
139- { ! isLoading &&
140- ! errorMessage &&
141- currentItems . map ( ( member , index ) => {
142- const isLast = index === currentItems . length - 1
143- return (
144- < div
145- key = { member . id }
112+ < div className = "relative flex size-12 shrink-0" >
113+ < Image src = "/images/invitation-white.png" fill alt = "초대 버튼" />
114+ </ div >
115+ < p className = "text-14 text-white" > 초대하기</ p >
116+ </ button >
117+ </ PaginationHeader >
118+
119+ < form className = "overflow-x-auto" >
120+ < label htmlFor = "title" className = "Text-black mb-8 block text-16" >
121+ 이메일
122+ </ label >
123+ < div className = "flex flex-col gap-4" >
124+ { isLoading && (
125+ < p className = "Text-gray py-12 text-center" > 로딩 중...</ p >
126+ ) }
127+
128+ { errorMessage && (
129+ < p className = "Text-blue py-12 text-center" > { errorMessage } </ p >
130+ ) }
131+
132+ { ! isLoading &&
133+ ! errorMessage &&
134+ currentItems . map ( ( member , index ) => {
135+ const isLast = index === currentItems . length - 1
136+ return (
137+ < div
138+ key = { member . id }
139+ className = { cn (
140+ 'flex items-center justify-between gap-12 py-4' ,
141+ ! isLast && 'Border-bottom' ,
142+ ) }
143+ >
144+ < div className = "flex min-w-0 items-center gap-12" >
145+ < div className = "flex min-w-0 flex-col" >
146+ < Tooltip content = { member . invitee . nickname } >
147+ < p className = "Text-black max-w-[200px] cursor-help truncate text-13" >
148+ { member . invitee . email }
149+ </ p >
150+ </ Tooltip >
151+ </ div >
152+ </ div >
153+
154+ < button
155+ type = "button"
156+ disabled = { cancelMutation . isPending }
146157 className = { cn (
147- 'flex items-center justify-between py-4' ,
148- ! isLast && 'Border-bottom' ,
158+ 'Text-btn Border-btn w-fit shrink-0 rounded-md px-16 py-2' ,
159+ cancelMutation . isPending &&
160+ 'cursor-not-allowed opacity-50' ,
149161 ) }
162+ onClick = { ( ) => cancelMutation . mutate ( member . id ) }
150163 >
151- < div className = "flex items-center gap-12" >
152- < div className = "flex flex-col" >
153- < Tooltip content = { member . invitee . nickname } >
154- < p className = "Text-black cursor-help text-13" >
155- { member . invitee . email }
156- </ p >
157- </ Tooltip >
158- </ div >
159- </ div >
160-
161- < button
162- type = "button"
163- disabled = { cancelMutation . isPending }
164- className = { cn (
165- 'Text-btn Border-btn rounded-md px-16 py-2' ,
166- cancelMutation . isPending &&
167- 'cursor-not-allowed opacity-50' ,
168- ) }
169- onClick = { ( ) => cancelMutation . mutate ( member . id ) }
170- >
171- { cancelMutation . isPending ? '취소 중...' : '취소' }
172- </ button >
173- </ div >
174- )
175- } ) }
176- </ div >
177- </ form >
178- </ div >
164+ { cancelMutation . isPending ? '취소 중...' : '취소' }
165+ </ button >
166+ </ div >
167+ )
168+ } ) }
169+ </ div >
170+ </ form >
179171 </ div >
180172 )
181173}
0 commit comments