@@ -95,56 +95,44 @@ function InvitedList({
9595 } ;
9696
9797 return (
98- < div className = "relative bg-white w-full max-w-[260px] sm:max-w-[504px] lg:max-w-[966px] mx-auto mt-[40px]" >
98+ /* 초대 목록 헤더 */
99+ < div className = "relative bg-white w-full max-w-[260px] sm:max-w-[504px] lg:max-w-[966px] mx-auto mt-1" >
99100 { filteredData . length > 0 && (
100- < div className = "hidden sm:grid grid-cols-3 px-6 w-full h-[26px] justify-start items-center" >
101- < p className = "lg:ml-10 font-normal text-[var(--color-gray2)]" > 이름</ p >
102- < p className = "font-normal text-[var(--color-gray2)]" > 초대자</ p >
103- < p className = "lg:ml-13 font-normal text-[var(--color-gray2)]" >
101+ < div className = "font-16r hidden sm:grid grid-cols-[3fr_2fr_3fr] px-4 w-full h-[26px] items-center mb-5 " >
102+ < p className = "text-[var(--color-gray2)] whitespace-nowrap " > 이름</ p >
103+ < p className = "text-[var(--color-gray2)] whitespace-nowrap " > 초대자</ p >
104+ < p className = "text-center text-[var(--color-gray2)] whitespace-nowrap " >
104105 수락 여부
105106 </ p >
106107 </ div >
107108 ) }
108- < div className = "scroll-area h-[400px] overflow-y-auto overflow-x-hidden" >
109- { filteredData . length > 0
110- ? filteredData . map ( ( invite , index ) => (
111- < div
112- key = { index }
113- className = "pb-5 mb-[20px] w-full max-w-[260px] sm:max-w-[504px] lg:max-w-[966px] h-auto sm:h-[50px]
114- sm:grid sm:grid-cols-[1fr_1fr_1fr] sm:items-center flex flex-col gap-10 border-b border-[var(--color-gray4)]"
115- >
116- { /* 모바일 레이아웃 */ }
117- < div className = "flex flex-col mt-1 sm:hidden" >
109+
110+ { /* 리스트 */ }
111+ < div className = "scroll-area h-[150vw] max-h-[570px] sm:max-h-[320px] lg:max-h-[400px] overflow-y-auto overflow-x-hidden" >
112+ { filteredData . length > 0 ? (
113+ filteredData . map ( ( invite , index ) => (
114+ < div
115+ key = { index }
116+ className = "pb-5 mb-[20px] w-full max-w-[260px] sm:max-w-[504px] lg:max-w-[966px]
117+ h-auto sm:h-[50px] border-b border-[var(--color-gray4)]
118+ sm:grid sm:grid-cols-[3fr_2fr_3fr] sm:items-center
119+ flex flex-col gap-10"
120+ >
121+ { /* 모바일 레이아웃 */ }
122+ < div className = "flex flex-col mt-1 sm:hidden px-4 w-full gap-2" >
123+ < div className = "flex justify-between" >
118124 < span className = "text-[var(--color-gray2)]" > 이름</ span >
119- < span className = "text-[#333236]" > { invite . title } </ span >
120- < span className = "mr-3.5 text-[var(--color-gray2)]" >
121- 초대자
122- </ span > { " " }
123- < span className = "text-[#333236]" > { invite . nickname } </ span >
124- < div className = "flex gap-2 mt-2 justify-center" >
125- < button
126- className = "cursor-pointer border px-3 py-1 rounded-md w-[84px] h-[32px] text-[var(--primary)] border-[var(--color-gray3)]"
127- onClick = { ( ) => rejectInvite ( invite . id ) }
128- >
129- 거절
130- </ button >
131- < button
132- className = "cursor-pointer bg-[var(--primary)] text-white px-3 py-1 rounded-md w-[84px] h-[32px]"
133- onClick = { ( ) => acceptInvite ( invite . id ) }
134- >
135- 수락
136- </ button >
137- </ div >
125+ < span className = "text-[#333236] font-medium" >
126+ { invite . title }
127+ </ span >
138128 </ div >
139-
140- { /* 웹, 태블릿 레이아웃 */ }
141- < p className = "lg:ml-21 md:ml-11 ml-9 justify-left mt-1 w-full hidden sm:flex" >
142- { invite . title }
143- </ p >
144- < p className = "lg:mr-25 md:mr-10 ml-9 justify-left mt-1 hidden sm:flex" >
145- { invite . nickname }
146- </ p >
147- < div className = "lg:mr-5 gap-2 mt-1 mr-2 justify-between sm:justify-start hidden sm:flex" >
129+ < div className = "flex justify-between" >
130+ < span className = "text-[var(--color-gray2)]" > 초대자</ span >
131+ < span className = "text-[#333236] font-medium" >
132+ { invite . nickname }
133+ </ span >
134+ </ div >
135+ < div className = "flex gap-2 mt-1 justify-end" >
148136 < button
149137 className = "cursor-pointer border px-3 py-1 rounded-md w-[84px] h-[32px] text-[var(--primary)] border-[var(--color-gray3)]"
150138 onClick = { ( ) => rejectInvite ( invite . id ) }
@@ -159,15 +147,43 @@ function InvitedList({
159147 </ button >
160148 </ div >
161149 </ div >
162- ) )
163- : ! hasMore && < NoResultDashBoard searchTitle = { searchTitle } /> } { " " }
164- { /* 검색 내역이 없을 경우 */ }
150+
151+ { /* 웹/태블릿 레이아웃 */ }
152+ < div className = "hidden sm:flex items-center pl-4" >
153+ < p className = "text-[#333236]" > { invite . title } </ p >
154+ </ div >
155+ < div className = "hidden sm:flex items-center pl-5 lg:pl-0" >
156+ < p className = "text-[#333236]" > { invite . nickname } </ p >
157+ </ div >
158+ < div className = "hidden sm:flex items-center justify-center gap-2 mr-1 lg:mr-12" >
159+ < button
160+ className = "cursor-pointer border px-3 py-1 rounded-md w-[84px] h-[32px] text-[var(--primary)] border-[var(--color-gray3)]"
161+ onClick = { ( ) => rejectInvite ( invite . id ) }
162+ >
163+ 거절
164+ </ button >
165+ < button
166+ className = "cursor-pointer bg-[var(--primary)] text-white px-3 py-1 rounded-md w-[84px] h-[32px]"
167+ onClick = { ( ) => acceptInvite ( invite . id ) }
168+ >
169+ 수락
170+ </ button >
171+ </ div >
172+ </ div >
173+ ) )
174+ ) : ! hasMore ? (
175+ < NoResultDashBoard searchTitle = { searchTitle } />
176+ ) : null }
177+
178+ { /* 검색 결과가 존재하지만 더 이상 데이터가 없을 때 */ }
165179 { filteredData . length > 0 && ! hasMore && (
166- < p className = "lg:mr-18 text-center text-gray-400 bg-transparent" >
180+ < p className = "text-center text-gray-400 bg-transparent" >
167181 더 이상 초대 목록이 없습니다.
168182 </ p >
169183 ) }
170- { hasMore && < div ref = { observerRef } className = "h-[50px] w-[50px]" > </ div > }
184+
185+ { /* 인터섹션 옵저버 */ }
186+ { hasMore && < div ref = { observerRef } className = "h-[50px] w-[50px]" /> }
171187 </ div >
172188 </ div >
173189 ) ;
@@ -264,34 +280,33 @@ export default function InvitedDashBoard() {
264280 ) : (
265281 < div className = "relative bg-white rounded-lg shadow-md w-[260px] sm:w-[504px] lg:w-[1022px] h-[770px] sm:h-[592px] lg:h-[620px] max-w-none" >
266282 < div className = "flex flex-col p-6 w-full h-[104px]" >
267- < div className = "flex flex-col w-[228px] sm:w-[448px] lg:w-[966px] gap-[24px]" >
283+ < div className = "flex flex-col w-full sm:w-[448px] lg:w-[966px] gap-[24px]" >
268284 < p className = "text-black3 text-xl sm:text-2xl font-bold" >
269285 초대받은 대시보드
270286 </ p >
271287
272- < div className = "relative w-[228px] sm:w-[448px] lg:w-[966px] mx-auto" >
288+ < div className = "relative w-full sm:w-[448px] lg:w-[966px] mx-auto" >
273289 < input
274290 id = "title"
275291 placeholder = "검색"
276292 type = "text"
277293 value = { searchTitle }
278294 onChange = { handleSearchInputChange }
279- className = "text-[var(--color-gray2)] w-full h-[40px] px -[40px] py-[6px] border border-[#D9D9D9] bg-white rounded-[6px] placeholder-gray-400 outline-none"
295+ className = "text-black3 w-full h-[40px] pl -[40px] py-[6px] border border-[#D9D9D9] bg-white rounded-[6px] placeholder-gray-400 outline-none"
280296 />
281297 < Search
282298 width = { 18 }
283299 height = { 18 }
284300 color = "#333236"
285- className = "absolute left-[12px] top-1/2 transform -translate-y-1/2"
286- />
287-
288- < InvitedList
289- searchTitle = { searchTitle }
290- invitationData = { invitationArray }
291- fetchNextPage = { fetchNextPage }
292- hasMore = { hasMore }
301+ className = "absolute left-[16px] top-1/2 transform -translate-y-1/2 z-50"
293302 />
294303 </ div >
304+ < InvitedList
305+ searchTitle = { searchTitle }
306+ invitationData = { invitationArray }
307+ fetchNextPage = { fetchNextPage }
308+ hasMore = { hasMore }
309+ />
295310 </ div >
296311 </ div >
297312 </ div >
0 commit comments