feat: inline critical css

This commit is contained in:
2023-08-08 11:18:54 +02:00
parent 899f5bca85
commit 6123956f08
5 changed files with 40 additions and 38 deletions

View File

@@ -4,6 +4,7 @@ import { useEventListener } from "@lib/hooks/useEventListener.ts";
import { menus } from "@islands/KMenu/commands.ts";
import { MenuEntry } from "@islands/KMenu/types.ts";
import * as icons from "@components/icons.tsx";
import { IS_BROWSER } from "$fresh/runtime.ts";
const KMenuEntry = (
{ entry, activeIndex, index }: {
entry: MenuEntry;
@@ -150,7 +151,7 @@ export const KMenu = (
} else {
input.current?.blur();
}
}, typeof document !== "undefined" ? document?.body : undefined);
}, IS_BROWSER ? document?.body : undefined);
return (
<div