import { unstable_cache as cache } from "next/cache"; import Image from "next/image"; import { EmbeddedTweet, TweetNotFound } from "react-tweet"; import { fetchTweet as _fetchTweet } from "react-tweet/api"; import { cn } from "@/lib/utils"; const fetchTweet = cache(_fetchTweet, undefined, { revalidate: false, // cache indefinitely tags: ["tweet"], }); const Tweet = async ({ id, className }: { id: string; className?: string }) => { try { const { data } = await fetchTweet(id); return (