33import { useState , useEffect } from 'react' ;
44import { useRouter , useSearchParams , usePathname } from 'next/navigation' ;
55import Link from 'next/link' ;
6- import { Search , MapPin , Briefcase , ExternalLink , LayoutDashboard } from 'lucide-react' ;
7- import { Card , CardContent , CardFooter } from "@repo/ui/components/ui/card" ;
8- import { Button } from "@repo/ui/components/ui/button" ;
9- import { Badge } from "@repo/ui/components/ui/badge" ;
10- import { Input } from "@repo/ui/components/ui/input" ;
6+ import {
7+ Search ,
8+ MapPin ,
9+ Briefcase ,
10+ ExternalLink ,
11+ LayoutDashboard ,
12+ } from 'lucide-react' ;
13+ import { Card , CardContent , CardFooter } from '@repo/ui/components/ui/card' ;
14+ import { Button } from '@repo/ui/components/ui/button' ;
15+ import { Input } from '@repo/ui/components/ui/input' ;
1116
1217export default function ClientResumes ( {
1318 initialResumes,
@@ -113,76 +118,87 @@ export default function ClientResumes({
113118
114119 { /* Resume Grid */ }
115120 < div className = "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-8" >
116- { isLoading ? (
117- // Loading skeletons
118- Array . from ( { length : 6 } ) . map ( ( _ , i ) => (
119- < Card key = { i } className = "animate-pulse" >
120- < CardContent className = "p-6" >
121- < div className = "flex items-start gap-4" >
122- < div className = "w-16 h-16 bg-gray-200 rounded-full" />
123- < div className = "flex-1" >
124- < div className = "h-4 bg-gray-200 rounded w-3/4 mb-2" />
125- < div className = "h-3 bg-gray-200 rounded w-1/2" />
121+ { isLoading
122+ ? // Loading skeletons
123+ Array . from ( { length : 6 } ) . map ( ( _ , i ) => (
124+ < Card key = { i } className = "animate-pulse" >
125+ < CardContent className = "p-6" >
126+ < div className = "flex items-start gap-4" >
127+ < div className = "w-16 h-16 bg-gray-200 rounded-full" />
128+ < div className = "flex-1" >
129+ < div className = "h-4 bg-gray-200 rounded w-3/4 mb-2" />
130+ < div className = "h-3 bg-gray-200 rounded w-1/2" />
131+ </ div >
126132 </ div >
127- </ div >
128- </ CardContent >
129- </ Card >
130- ) )
131- ) : (
132- initialResumes . map ( ( resume ) => (
133- < Card key = { resume . username } className = "h-full hover:shadow-lg transition-shadow" >
134- < CardContent className = "p-6" >
135- < div className = "flex items-start gap-4" >
136- { /* Avatar */ }
137- < img
138- src = { resume . image }
139- alt = { resume . name || resume . username }
140- className = "w-16 h-16 rounded-full object-cover border-2 border-gray-100"
141- />
142-
143- { /* Info */ }
144- < div className = "flex-1 min-w-0" >
145- < h3 className = "font-semibold text-lg text-gray-900 truncate" >
146- { resume . name || resume . username }
147- </ h3 >
148-
149- { resume . label && (
150- < p className = "text-gray-600 text-sm mb-2 truncate" >
151- < Briefcase className = "inline-block w-4 h-4 mr-1 -mt-0.5" />
152- { resume . label }
153- </ p >
154- ) }
155-
156- { resume . location ?. city && (
157- < p className = "text-gray-500 text-sm flex items-center gap-1" >
158- < MapPin className = "w-4 h-4" />
159- < span className = "truncate" >
160- { [ resume . location . city , resume . location . region , resume . location . countryCode ]
161- . filter ( Boolean )
162- . join ( ', ' ) }
163- </ span >
164- </ p >
165- ) }
133+ </ CardContent >
134+ </ Card >
135+ ) )
136+ : initialResumes . map ( ( resume ) => (
137+ < Card
138+ key = { resume . username }
139+ className = "h-full hover:shadow-lg transition-shadow"
140+ >
141+ < CardContent className = "p-6" >
142+ < div className = "flex items-start gap-4" >
143+ { /* Avatar */ }
144+ < img
145+ src = { resume . image }
146+ alt = { resume . name || resume . username }
147+ className = "w-16 h-16 rounded-full object-cover border-2 border-gray-100"
148+ />
149+
150+ { /* Info */ }
151+ < div className = "flex-1 min-w-0" >
152+ < h3 className = "font-semibold text-lg text-gray-900 truncate" >
153+ { resume . name || resume . username }
154+ </ h3 >
155+
156+ { resume . label && (
157+ < p className = "text-gray-600 text-sm mb-2 truncate" >
158+ < Briefcase className = "inline-block w-4 h-4 mr-1 -mt-0.5" />
159+ { resume . label }
160+ </ p >
161+ ) }
162+
163+ { resume . location ?. city && (
164+ < p className = "text-gray-500 text-sm flex items-center gap-1" >
165+ < MapPin className = "w-4 h-4" />
166+ < span className = "truncate" >
167+ { [
168+ resume . location . city ,
169+ resume . location . region ,
170+ resume . location . countryCode ,
171+ ]
172+ . filter ( Boolean )
173+ . join ( ', ' ) }
174+ </ span >
175+ </ p >
176+ ) }
177+ </ div >
166178 </ div >
167- </ div >
168- </ CardContent >
169- < CardFooter className = "px-6 py-4 border-t flex gap-2 justify-end bg-gray-50" >
170- < Button variant = "outline" size = "sm" asChild >
171- < Link href = { `/${ resume . username } ` } className = "flex items-center gap-1" >
172- < ExternalLink className = "w-4 h-4" />
173- View Resume
174- </ Link >
175- </ Button >
176- < Button variant = "outline" size = "sm" asChild >
177- < Link href = { `/${ resume . username } /dashboard` } className = "flex items-center gap-1" >
178- < LayoutDashboard className = "w-4 h-4" />
179- Dashboard
180- </ Link >
181- </ Button >
182- </ CardFooter >
183- </ Card >
184- ) )
185- ) }
179+ </ CardContent >
180+ < CardFooter className = "px-6 py-4 border-t flex gap-2 justify-end bg-gray-50" >
181+ < Button variant = "outline" size = "sm" asChild >
182+ < Link
183+ href = { `/${ resume . username } ` }
184+ className = "flex items-center gap-1"
185+ >
186+ < ExternalLink className = "w-4 h-4" />
187+ View Resume
188+ </ Link >
189+ </ Button >
190+ < Button variant = "outline" size = "sm" asChild >
191+ < Link
192+ href = { `/${ resume . username } /dashboard` }
193+ className = "flex items-center gap-1"
194+ >
195+ < LayoutDashboard className = "w-4 h-4" />
196+ Dashboard
197+ </ Link >
198+ </ Button >
199+ </ CardFooter >
200+ </ Card >
201+ ) ) }
186202 </ div >
187203
188204 { /* Pagination */ }
@@ -195,7 +211,7 @@ export default function ClientResumes({
195211 >
196212 Previous
197213 </ Button >
198-
214+
199215 { getPageNumbers ( ) . map ( ( pageNum , index ) => (
200216 < Button
201217 key = { index }
@@ -211,7 +227,7 @@ export default function ClientResumes({
211227 { pageNum }
212228 </ Button >
213229 ) ) }
214-
230+
215231 < Button
216232 variant = "outline"
217233 onClick = { ( ) => handlePageChange ( currentPage + 1 ) }
0 commit comments