11import { Page } from "@/components/page-layout" ;
22import { Card } from "@/components/ui/card" ;
33import { Dialog } from "@/components/ui/dialog" ;
4+ import { Heading } from "@/components/ui/heading" ;
45import { Label } from "@/components/ui/label" ;
56import { Skeleton } from "@/components/ui/skeleton" ;
67import { Type } from "@/components/ui/type" ;
@@ -10,7 +11,7 @@ import { useRoutes } from "@/routes";
1011import { useLatestDeployment } from "@gram/client/react-query" ;
1112import { Badge , Button , Input , Stack } from "@speakeasy-api/moonshine" ;
1213import { useMutation } from "@tanstack/react-query" ;
13- import { CheckCircle , Loader2 , Search } from "lucide-react" ;
14+ import { CheckCircle , Loader2 , Search , SearchXIcon } from "lucide-react" ;
1415import { useEffect , useMemo , useRef , useState } from "react" ;
1516import { Outlet } from "react-router" ;
1617
@@ -274,11 +275,7 @@ export default function Catalog() {
274275 ) }
275276
276277 { ! isLoading && allServers ?. length === 0 && (
277- < div className = "text-center py-12" >
278- < Type variant = "subheading" className = "text-muted-foreground" >
279- No MCP servers found matching "{ searchQuery } "
280- </ Type >
281- </ div >
278+ < EmptySearchResult onClear = { ( ) => setSearchQuery ( "" ) } />
282279 ) }
283280 </ Stack >
284281 { addToProjectDialog }
@@ -289,6 +286,33 @@ export default function Catalog() {
289286 ) ;
290287}
291288
289+ function EmptySearchResult ( { onClear } : { onClear : ( ) => void } ) {
290+ return (
291+ < div className = "w-full flex items-center justify-center bg-background rounded-xl border-1 py-8" >
292+ < Stack
293+ gap = { 1 }
294+ className = "w-full max-w-sm m-8"
295+ align = "center"
296+ justify = "center"
297+ >
298+ < div className = "py-6" >
299+ < SearchXIcon className = "size-16 text-foreground" />
300+ </ div >
301+ < Heading variant = "h5" className = "font-medium" >
302+ No matching entries
303+ </ Heading >
304+ < Type small muted className = "mb-4 text-center" >
305+ No MCP servers match your query. Try adjusting or clearing your
306+ search.
307+ </ Type >
308+ < Button onClick = { onClear } size = "sm" >
309+ Clear Search
310+ </ Button >
311+ </ Stack >
312+ </ div >
313+ ) ;
314+ }
315+
292316interface MCPServerCardProps {
293317 server : Server ;
294318 onAddToProject : ( server : Server ) => void ;
0 commit comments