import useShare from "@shared/hooks/useShare"; type Props = React.ImgHTMLAttributes & { value: string; size?: number | string; /** Optional cache-busting key, e.g. updatedAt timestamp. */ cacheKey?: string; }; export const CustomEmoji = ({ value, size = 16, cacheKey, ...props }: Props) => { const { shareId } = useShare(); let src = `/api/emojis.redirect?id=${value}`; if (shareId) { src += `&shareId=${shareId}`; } if (cacheKey) { src += `&v=${encodeURIComponent(cacheKey)}`; } return ( ); };