File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed
packages/web/src/components/search Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import { ArrowUpRightIcon } from "lucide-react";
2
2
import { useMemo } from "react" ;
3
3
4
4
import { getRandomItems } from "@/core/util/random" ;
5
- import { useOperatorHighlighting } from "@/hooks/useOperatorHighlighting" ;
6
5
import { usePublicSearch } from "@/hooks/usePublicSearch" ;
7
6
import { Button } from "@/components/ui/button" ;
8
7
@@ -29,29 +28,15 @@ interface SuggestedSearchCardProps {
29
28
30
29
export function SuggestedSearchCard ( { search } : SuggestedSearchCardProps ) {
31
30
const { handleSearch } = usePublicSearch ( { mode : "suggested" } ) ;
32
- const highlightedParts = useOperatorHighlighting ( search ) ;
33
31
34
32
return (
35
33
< Button
36
34
variant = "outline"
37
- className = "group w-full justify-between px-4 py-6 text-left hover:bg-muted/50"
35
+ className = "group w-full justify-between px-4 py-8 text-left hover:bg-muted/50"
38
36
onClick = { ( e ) => handleSearch ( e , search ) }
39
37
>
40
38
< span className = "whitespace-pre-wrap break-words leading-relaxed" >
41
- { highlightedParts . map ( ( part , i ) => (
42
- < span
43
- key = { i }
44
- className = {
45
- part . type === "operator"
46
- ? "text-blue-600 dark:text-blue-400"
47
- : part . type === "value"
48
- ? "text-orange-500"
49
- : undefined
50
- }
51
- >
52
- { part . text }
53
- </ span >
54
- ) ) }
39
+ { search }
55
40
</ span >
56
41
< ArrowUpRightIcon className = "ml-2 size-4 shrink-0 opacity-50 transition-opacity group-hover:opacity-100" />
57
42
</ Button >
You can’t perform that action at this time.
0 commit comments