import { useMemo, type ComponentProps } from "react"; import { toHex, truncateHex } from "../../hex"; import { CopyButton } from "../CopyButton"; type OwnProps = { feedKey: string; }; type Props = Omit< ComponentProps, keyof OwnProps | "text" | "children" > & OwnProps; export const FeedKey = ({ feedKey, ...props }: Props) => { const hexKey = useMemo(() => toHex(feedKey), [feedKey]); const truncatedKey = useMemo(() => truncateHex(hexKey), [hexKey]); return ( {truncatedKey} ); };