|
1 | 1 | import { MagnifyingGlassIcon, XMarkIcon } from "@heroicons/react/20/solid"; |
2 | 2 | import { motion } from "framer-motion"; |
3 | | -import { useCallback, useEffect, useRef, useState } from "react"; |
| 3 | +import { useEffect, useRef, useState } from "react"; |
4 | 4 | import { Input } from "~/components/primitives/Input"; |
5 | 5 | import { ShortcutKey } from "~/components/primitives/ShortcutKey"; |
6 | 6 | import { SimpleTooltip } from "~/components/primitives/Tooltip"; |
@@ -38,19 +38,19 @@ export function SearchInput({ |
38 | 38 | } |
39 | 39 | }, [value, text, isFocused, paramName]); |
40 | 40 |
|
41 | | - const handleSubmit = useCallback(() => { |
| 41 | + const handleSubmit = () => { |
42 | 42 | const resetValues = Object.fromEntries(resetParams.map((p) => [p, undefined])); |
43 | 43 | if (text.trim()) { |
44 | 44 | replace({ [paramName]: text.trim(), ...resetValues }); |
45 | 45 | } else { |
46 | 46 | del([paramName, ...resetParams]); |
47 | 47 | } |
48 | | - }, [text, replace, del, resetParams, paramName]); |
| 48 | + }; |
49 | 49 |
|
50 | | - const handleClear = useCallback(() => { |
| 50 | + const handleClear = () => { |
51 | 51 | setText(""); |
52 | 52 | del([paramName, ...resetParams]); |
53 | | - }, [del, resetParams, paramName]); |
| 53 | + }; |
54 | 54 |
|
55 | 55 | return ( |
56 | 56 | <div className="flex items-center gap-1"> |
|
0 commit comments