import { Doc } from "../src/collect.ts"; import { useEffect, useState } from "preact/hooks"; import { Index } from "../src/client_search.ts"; import { encodePath } from "../util/util.ts"; function SearchBar(props: { search?: string; onSearch?: (search: string) => void; }) { const [search, setSearch] = useState(props.search ?? ""); return (