feat: upgrade fresh

This commit is contained in:
2025-01-05 14:59:05 +01:00
parent d0e7af971e
commit 1937ef55bb
8 changed files with 40 additions and 22 deletions

View File

@ -1,5 +1,5 @@
import { unified } from "https://esm.sh/unified@10.1.2";
import { render } from "https://deno.land/x/gfm@0.2.5/mod.ts";
import { render } from "gfm";
import "https://esm.sh/prismjs@1.29.0/components/prism-typescript?no-check";
import "https://esm.sh/prismjs@1.29.0/components/prism-bash?no-check";
import "https://esm.sh/prismjs@1.29.0/components/prism-rust?no-check";

View File

@ -3,7 +3,7 @@ import { useEffect, useRef } from "preact/hooks";
export function useEventListener<T extends Event>(
eventName: string,
handler: (event: T) => void,
element: Window | HTMLElement = window,
element: Window | HTMLElement = globalThis,
) {
// Create a ref that stores handler
const savedHandler = useRef<(event: Event) => void>();