believe in god, hope this works

This commit is contained in:
codetorso 2024-07-20 04:38:38 +05:30
parent 48f02e6898
commit 347aa36680
7 changed files with 80 additions and 80 deletions

View file

@ -6,15 +6,13 @@ import { FilterSpaces } from "./filterSpaces";
function QueryInput({
setQueryPresent,
initialSpaces,
className,
handleSubmit,
}: {
setQueryPresent: (t:boolean) => void;
setQueryPresent: (t: boolean) => void;
initialSpaces?: {
id: number;
name: string;
}[];
className?: string;
mini?: boolean;
handleSubmit: (q: string, spaces: { id: number; name: string }[]) => void;
}) {
@ -38,7 +36,6 @@ function QueryInput({
handleSubmit(q, selectedSpaces);
setQ("");
}}
className=""
>
<textarea
autoFocus
@ -57,10 +54,12 @@ function QueryInput({
setQ("");
}
}}
onChange={(e) => setQ((prev)=> {
setQueryPresent(!!(e.target.value.length));
return e.target.value;
})}
onChange={(e) =>
setQ((prev) => {
setQueryPresent(!!e.target.value.length);
return e.target.value;
})
}
value={q}
/>
<FilterSpaces