import { ComponentChildren } from "preact"; import { resources } from "@lib/resources.ts"; import { CSS, KATEX_CSS } from "https://deno.land/x/gfm@0.2.5/mod.ts"; import { Head } from "$fresh/runtime.ts"; import Search, { RedirectSearchHandler } from "@islands/Search.tsx"; import { KMenu } from "@islands/KMenu.tsx"; import { Emoji } from "@components/Emoji.tsx"; import { SearchResult } from "@lib/types.ts"; export type Props = { children: ComponentChildren; title?: string; name?: string; url: URL; description?: string; context?: { type: string }; searchResults?: SearchResult; }; 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}; };