Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
1import type { AccountFragment } from "@hey/indexer";
2import { motion } from "motion/react";
3import { Virtualizer } from "virtua";
4import SingleAccount from "@/components/Shared/Account/SingleAccount";
5import cn from "@/helpers/cn";
6import { useAccountStore } from "@/store/persisted/useAccountStore";
7import { accountsList } from "@/variants";
8
9interface MoreRelevantPeopleProps {
10 accounts: AccountFragment[];
11}
12
13const MoreRelevantPeople = ({ accounts }: MoreRelevantPeopleProps) => {
14 const { currentAccount } = useAccountStore();
15
16 return (
17 <div className="max-h-[80vh] overflow-y-auto">
18 <Virtualizer>
19 {accounts.slice(5).map((account, index) => (
20 <motion.div
21 animate="visible"
22 className={cn(
23 "divider p-5",
24 index === accounts.slice(5).length - 1 && "border-b-0"
25 )}
26 initial="hidden"
27 key={account.address}
28 variants={accountsList}
29 >
30 <SingleAccount
31 account={account}
32 hideFollowButton={currentAccount?.address === account.address}
33 hideUnfollowButton={currentAccount?.address === account.address}
34 showBio
35 showUserPreview={false}
36 />
37 </motion.div>
38 ))}
39 </Virtualizer>
40 </div>
41 );
42};
43
44export default MoreRelevantPeople;