diff --git a/src/app/search/components/searchResultsPanel/index.tsx b/src/app/search/components/searchResultsPanel/index.tsx index 023f6bf3..128ab9b2 100644 --- a/src/app/search/components/searchResultsPanel/index.tsx +++ b/src/app/search/components/searchResultsPanel/index.tsx @@ -1,9 +1,7 @@ 'use client'; -import { ScrollArea } from "@/components/ui/scroll-area"; -import { Scrollbar } from "@radix-ui/react-scroll-area"; -import { FileMatchContainer } from "./fileMatchContainer"; import { SearchResultFile } from "@/lib/types"; +import { FileMatchContainer } from "./fileMatchContainer"; interface SearchResultsPanelProps { fileMatches: SearchResultFile[]; @@ -16,32 +14,16 @@ export const SearchResultsPanel = ({ onOpenFileMatch, onMatchIndexChanged, }: SearchResultsPanelProps) => { - - if (fileMatches.length === 0) { - return ( -
No results found
-Results for: {fileMatches.length} files in {searchDurationMs} ms
- {isMoreResultsButtonVisible && ( +Loading...
+ ) : fileMatches.length > 0 ? ( +{`[${searchDurationMs} ms] Displaying ${numMatches} matches in ${fileMatches.length} ${fileMatches.length > 1 ? 'files' : 'file'}`}
+ ) : ( +No results
+ ) + } + {isMoreResultsButtonVisible && !isLoading && (Searching...
No results found
+