import { ReactNode } from "react"; import { FormattedMessage } from "react-intl"; import useEventPublisher from "Feed/EventPublisher"; import { HexKey } from "@snort/nostr"; import ProfilePreview from "Element/ProfilePreview"; import messages from "./messages"; export interface FollowListBaseProps { pubkeys: HexKey[]; title?: ReactNode | string; showFollowAll?: boolean; showAbout?: boolean; } export default function FollowListBase({ pubkeys, title, showFollowAll, showAbout }: FollowListBaseProps) { const publisher = useEventPublisher(); async function followAll() { const ev = await publisher.addFollow(pubkeys); publisher.broadcast(ev); } return (
{(showFollowAll ?? true) && (
{title}
)} {pubkeys?.map(a => ( ))}
); }