import { ComponentChildren } from "preact"; import Search from "@islands/Search.tsx"; import { GenericResource, SearchResult } from "@lib/types.ts"; export type Props = { children: ComponentChildren; title?: string; name?: string; url: URL; description?: string; context?: { type: string }; searchResults?: GenericResource[]; }; export const MainLayout = ( { children, url, title, context, searchResults }: Props, ) => { const _url = typeof url === "string" ? new URL(url) : url; const hasSearch = _url.search.includes("q="); if (hasSearch) { return ( ); } return <>{children}; };