Revert placement of query length constant

This commit is contained in:
Sam Becker 2024-02-20 23:57:26 -06:00
parent e21c9873f8
commit 4f6f5157e6

View File

@ -12,6 +12,7 @@ import { BiDesktop, BiMoon, BiSun } from 'react-icons/bi';
// import { IoInvertModeSharp } from 'react-icons/io5';
const LISTENER_KEYDOWN = 'keydown';
const MINIMUM_QUERY_LENGTH = 2;
export type CommandKSection = {
heading: string
@ -33,8 +34,6 @@ export default function CommandKClient({
onQueryChange?: (query: string) => Promise<CommandKSection[]>
sections?: CommandKSection[]
}) {
const MINIMUM_QUERY_LENGTH = 2;
const [isOpen, setIsOpen] = useState(false);
const [queryRaw, setQueryRaw] = useState('');
const [queryDebounced] = useDebounce(queryRaw, 500, { trailing: true });