perf : cache
CI / Verify (push) Successful in 1m56s
CI / Build immutable images and deploy (push) Successful in 3m12s

This commit is contained in:
2026-10-08 23:21:34 +07:00 Unverified
parent 36063fc214
commit 9580407a90
58 changed files with 5797 additions and 5336 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
"use client";
import NextImage, { type ImageProps } from "next/image";
import { useState } from "react";
import { useState, type Ref } from "react";
const CDN_ORIGIN = "https://buzz-cdn.astrxl.dev";
export default function ResilientImage({ src, unoptimized, onError, ...props }: ImageProps) {
export default function ResilientImage({ src, unoptimized, onError, ...props }: ImageProps & { ref?: Ref<HTMLImageElement> }) {
const [failedSource, setFailedSource] = useState<string | null>(null);
const useOriginal = typeof src === "string" && failedSource === src;