feat: inline critical css
This commit is contained in:
@@ -2,14 +2,10 @@ import { useEffect, useRef, useState } from "preact/hooks";
|
||||
import useDebouncedCallback from "@lib/hooks/useDebouncedCallback.ts";
|
||||
import { IconGhost, IconLoader2, IconSearch } from "@components/icons.tsx";
|
||||
import { useEventListener } from "@lib/hooks/useEventListener.ts";
|
||||
import { SearchResponse } from "https://raw.githubusercontent.com/bradenmacdonald/typesense-deno/main/src/Typesense/Documents.ts";
|
||||
import { Recipe } from "@lib/resource/recipes.ts";
|
||||
import { Movie } from "@lib/resource/movies.ts";
|
||||
import { Article } from "@lib/resource/articles.ts";
|
||||
import { useTraceUpdate } from "@lib/hooks/useTraceProps.ts";
|
||||
import { SearchResult } from "@lib/types.ts";
|
||||
import { resources } from "@lib/resources.ts";
|
||||
import { isLocalImage } from "@lib/string.ts";
|
||||
import { IS_BROWSER } from "$fresh/runtime.ts";
|
||||
|
||||
export const RedirectSearchHandler = () => {
|
||||
useEventListener("keydown", (e: KeyboardEvent) => {
|
||||
@@ -20,7 +16,7 @@ export const RedirectSearchHandler = () => {
|
||||
) {
|
||||
window.location.href += "?q=";
|
||||
}
|
||||
}, typeof document !== "undefined" ? document?.body : undefined);
|
||||
}, IS_BROWSER ? document?.body : undefined);
|
||||
|
||||
return <></>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user