@@ -78,38 +78,68 @@ export function SearchUsers({ searchQuery }: SearchUsersProps) {
7878
7979 if ( searchQuery . trim ( ) . length < 2 ) {
8080 return (
81- < div className = "flex flex-col items-center justify-center p-12 text-center" >
82- < Search className = "h-12 w-12 text-muted-foreground mb-4" />
83- < h3 className = "text-lg font-semibold mb-2" > Search for users</ h3 >
84- < p className = "text-muted-foreground" >
85- Type at least 2 characters to search
86- </ p >
81+ < div className = "flex flex-col items-center justify-center p-16 text-center space-y-6" >
82+ < div className = "relative" >
83+ < div className = "absolute inset-0 bg-primary/20 blur-3xl rounded-full" />
84+ < div className = "relative bg-primary/10 p-6 rounded-full border border-primary/20" >
85+ < Search className = "h-16 w-16 text-primary" />
86+ </ div >
87+ </ div >
88+ < div className = "space-y-2" >
89+ < h3 className = "text-xl font-bold" > Discover New Connections</ h3 >
90+ < p className = "text-muted-foreground max-w-md" >
91+ Search for users by name or username to expand your network
92+ </ p >
93+ </ div >
94+ < div className = "flex items-center gap-2 text-sm text-muted-foreground" >
95+ < div className = "w-2 h-2 rounded-full bg-primary animate-pulse" />
96+ < span > Type at least 2 characters to start searching</ span >
97+ </ div >
8798 </ div >
8899 )
89100 }
90101
91102 if ( users . length === 0 ) {
92103 return (
93- < div className = "flex flex-col items-center justify-center p-12 text-center" >
94- < Search className = "h-12 w-12 text-muted-foreground mb-4" />
95- < h3 className = "text-lg font-semibold mb-2" > No users found</ h3 >
96- < p className = "text-muted-foreground" >
97- Try a different search term
104+ < div className = "flex flex-col items-center justify-center p-16 text-center space-y-6" >
105+ < div className = "relative" >
106+ < div className = "bg-muted/50 p-6 rounded-full border border-border" >
107+ < Search className = "h-16 w-16 text-muted-foreground" />
108+ </ div >
109+ </ div >
110+ < div className = "space-y-2" >
111+ < h3 className = "text-xl font-bold" > No users found</ h3 >
112+ < p className = "text-muted-foreground max-w-md" >
113+ We couldn't find anyone matching "{ searchQuery } "
114+ </ p >
115+ </ div >
116+ < p className = "text-sm text-muted-foreground" >
117+ Try searching with a different name or username
98118 </ p >
99119 </ div >
100120 )
101121 }
102122
103123 return (
104- < div className = "space-y-3" >
105- { users . map ( ( user ) => (
106- < UserCard
107- key = { user . id }
108- user = { user }
109- connectionStatus = { connectionStatuses [ user . id ] }
110- onConnectionChange = { handleConnectionChange }
111- />
112- ) ) }
124+ < div className = "space-y-4" >
125+ { /* Result count header */ }
126+ < div className = "flex items-center justify-between px-1" >
127+ < p className = "text-sm text-muted-foreground" >
128+ Found < span className = "font-semibold text-foreground" > { users . length } </ span > { users . length === 1 ? 'user' : 'users' }
129+ </ p >
130+ </ div >
131+
132+ { /* User list */ }
133+ < div className = "space-y-3" >
134+ { users . map ( ( user ) => (
135+ < UserCard
136+ key = { user . id }
137+ user = { user }
138+ connectionStatus = { connectionStatuses [ user . id ] }
139+ onConnectionChange = { handleConnectionChange }
140+ />
141+ ) ) }
142+ </ div >
113143 </ div >
114144 )
115145}
0 commit comments