@@ -49,27 +49,37 @@ const CatOwnersList = () => {
49
49
} ) ;
50
50
51
51
52
- if ( isLoading ) return < div > Loading...</ div > ;
53
- if ( error ) return < div > Error loading data</ div > ;
52
+ if ( isLoading ) return < div className = "fixed top-0 left-0 right-0 bottom-0 bg-slate-950 flex items-center justify-center font-mono text-white" >
53
+ Loading...
54
+ </ div >
55
+
56
+ if ( error ) return < div className = "fixed top-0 left-0 right-0 bottom-0 bg-slate-950 flex items-center justify-center font-mono text-white" >
57
+ Loading...
58
+ </ div >
59
+
54
60
55
61
return (
56
- < div className = "p-4 bg-slate-900 font-mono" >
57
- < h1 className = "text-2xl font-bold mb-4" > Cat Owner List</ h1 >
62
+ < div className = "items-center p-4 bg-slate-950 font-mono" >
63
+ < div className = "flex justify-center " >
64
+ < h1 className = "text-4xl items-center font-bold text-gray-400 mb-4" > 😻</ h1 >
65
+ < div className = "flex items-center justify-center w-8 h-8 text-xs font-medium text-white bg-gray-700 border-2 border-white rounded-full hover:bg-gray-600 dark:border-gray-800" > +99</ div >
66
+ </ div >
58
67
59
68
< InfiniteScroll
60
69
dataLength = { paginatedData ?. pages . flatMap ( page => page . data ) . length || 0 }
61
70
next = { fetchNextPage }
62
71
hasMore = { hasNextPage }
63
- loader = { < h4 > Loading more...</ h4 > }
72
+ loader = { < h4 className = 'm-auto p-5 text-center text-slate-200 text-2xl p-10 w-full bg-slate-500 rounded-lg' > Loading more cat lovers ...</ h4 > }
64
73
endMessage = { < p > No more data</ p > }
65
74
>
66
75
< ul className = "space-y-4" >
67
76
{ paginatedData ?. pages . flatMap ( page => page . data ) . map ( ( owner , index ) => (
68
- < li key = { index } className = "flex items-center space-x-4 border p-4 rounded-lg shadow" >
69
- < img src = { owner . ownerPicture } alt = "Owner" className = "w-16 h-16 rounded-full" />
77
+ < li key = { index }
78
+ className = "flex items-center m-auto space-x-4 w-3/5 border-2 border-neutral-900 p-4 rounded-lg shadow bg-slate-800 hover:bg-gray-900" >
79
+ < img src = { owner . ownerPicture } alt = "Owner" className = "w-16 h-16 border-2 border-neutral-800 rounded-3xl " />
70
80
< div >
71
- < p className = "text-xl font-semibold" > { owner . ownerName } </ p >
72
- < p className = "text-gray-600 " > { owner . catFact } </ p >
81
+ < p className = "text-xl font-semibold text-slate-400 " > { owner . ownerName } </ p >
82
+ < p className = "text-slate-500 font-light " > { owner . catFact } </ p >
73
83
</ div >
74
84
</ li >
75
85
) ) }
0 commit comments