import { HexKey, NostrLink, NostrPrefix } from "@snort/system"; import { FormattedMessage } from "react-intl"; import { default as ZapElement } from "@/Components/Event/Zap"; import Icon from "@/Components/Icons/Icon"; import RelaysMetadata from "@/Components/Relay/RelaysMetadata"; import { Tab } from "@/Components/Tabs/Tabs"; import Bookmarks from "@/Components/User/Bookmarks"; import FollowsList from "@/Components/User/FollowListBase"; import useFollowersFeed from "@/Feed/FollowersFeed"; import useFollowsFeed from "@/Feed/FollowsFeed"; import useRelaysFeed from "@/Feed/RelaysFeed"; import useZapsFeed from "@/Feed/ZapsFeed"; import { useBookmarkList } from "@/Hooks/useLists"; import { formatShort } from "@/Utils/Number"; import messages from "../messages"; export enum ProfileTabType { NOTES = 0, REACTIONS = 1, FOLLOWERS = 2, FOLLOWS = 3, ZAPS = 4, MUTED = 5, BLOCKED = 6, RELAYS = 7, BOOKMARKS = 8, } export function ZapsProfileTab({ id }: { id: HexKey }) { const zaps = useZapsFeed(new NostrLink(NostrPrefix.PublicKey, id)); const zapsTotal = zaps.reduce((acc, z) => acc + z.amount, 0); return ( <>

{zaps.map(z => ( ))} ); } export function FollowersTab({ id }: { id: HexKey }) { const followers = useFollowersFeed(id); return ; } export function FollowsTab({ id }: { id: HexKey }) { const follows = useFollowsFeed(id); return ; } export function RelaysTab({ id }: { id: HexKey }) { const relays = useRelaysFeed(id); return ; } export function BookMarksTab({ id }: { id: HexKey }) { const bookmarks = useBookmarkList(id); return ; } const ProfileTab = { Notes: { text: ( <> ), value: ProfileTabType.NOTES, }, Reactions: { text: ( <> ), value: ProfileTabType.REACTIONS, }, Followers: { text: ( <> ), value: ProfileTabType.FOLLOWERS, }, Follows: { text: ( <> ), value: ProfileTabType.FOLLOWS, }, Zaps: { text: ( <> ), value: ProfileTabType.ZAPS, }, Muted: { text: ( <> ), value: ProfileTabType.MUTED, }, Blocked: { text: ( <> ), value: ProfileTabType.BLOCKED, }, Relays: { text: ( <> ), value: ProfileTabType.RELAYS, }, Bookmarks: { text: ( <> ), value: ProfileTabType.BOOKMARKS, }, } as { [key: string]: Tab }; export default ProfileTab;