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"; import { join } from "path/mod.ts"; function SearchBar(props: { search?: string; onSearch?: (search: string) => void; }) { const [search, setSearch] = useState(props.search ?? ""); return (