"use client";
import { useState } from "react";
import type { SourceImage } from "@/lib/types";
/**
* Thumbnails from the web search, shown under an answer.
*
* Plain
: the app is a static export with `images.unoptimized`, so
* next/image buys nothing here. Hotlinked URLs die routinely, so anything
* that fails to load is dropped rather than left as a broken-image icon.
*/
export function ImageStrip({ images }: { images?: SourceImage[] }) {
const [broken, setBroken] = useState>(new Set());
const shown = (images ?? []).filter((im) => !broken.has(im.url));
if (shown.length === 0) return null;
return (
);
}