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