Leaflet Blog in Deno Fresh

more

Changed files
+2 -7
components
+2 -2
components/bluesky-embed.tsx
···
"use client";
-
import { useEffect, useId, useState } from "npm:react";
+
import { useEffect, useId, useState } from "preact/hooks";
const EMBED_URL = "https://embed.bsky.app";
···
useEffect(() => {
const abortController = new AbortController();
const { signal } = abortController;
-
window.addEventListener(
+
globalThis.addEventListener(
"message",
(event) => {
if (event.origin !== EMBED_URL) {
-5
components/post-info.tsx
···
import { date } from "../lib/date.ts";
import { env } from "../lib/env.ts";
-
import { CgTimelapse } from "jsr:@preact-icons/cg";
import { Paragraph } from "./typography.tsx";
import type { ComponentChildren } from "preact";
-
import { h } from "preact";
-
-
// Wrapper component for the icon to handle compatibility issues
-
const TimeIcon = () => h(CgTimelapse, { size: 13 });
// Calculate reading time based on content length
function getReadingTime(content: string): number {