From 8b401458fad97ba31a04471b9ce4e656ec2a15de Mon Sep 17 00:00:00 2001 From: Yoginth Date: Sat, 21 Dec 2024 12:23:34 +0530 Subject: [PATCH] Migrate to Lens v3 --- apps/web/src/components/Group/index.tsx | 2 +- .../Shared/Group/JoinLeaveButton.tsx | 6 +-- .../src/components/Shared/Modal/Members.tsx | 12 ++++-- .../Overview/Tool/AccountOverview.tsx | 42 +------------------ 4 files changed, 14 insertions(+), 48 deletions(-) diff --git a/apps/web/src/components/Group/index.tsx b/apps/web/src/components/Group/index.tsx index 806af76339ad..104baf28cf49 100644 --- a/apps/web/src/components/Group/index.tsx +++ b/apps/web/src/components/Group/index.tsx @@ -61,7 +61,7 @@ const ViewGroup: NextPage = () => {
- {currentAccount && group.isMember && } + {currentAccount && group.operations?.isMember && } diff --git a/apps/web/src/components/Shared/Group/JoinLeaveButton.tsx b/apps/web/src/components/Shared/Group/JoinLeaveButton.tsx index b9b93a02ea2d..63222b562ca2 100644 --- a/apps/web/src/components/Shared/Group/JoinLeaveButton.tsx +++ b/apps/web/src/components/Shared/Group/JoinLeaveButton.tsx @@ -13,11 +13,11 @@ const JoinLeaveButton: FC = ({ group, small = false }) => { - const [joined, setJoined] = useState(group.isMember); + const [joined, setJoined] = useState(group.operations?.isMember); useEffect(() => { - setJoined(group.isMember); - }, [group.isMember]); + setJoined(group.operations?.isMember); + }, [group.operations?.isMember]); return joined ? ( diff --git a/apps/web/src/components/Shared/Modal/Members.tsx b/apps/web/src/components/Shared/Modal/Members.tsx index feea258d861b..96b2e918dfc3 100644 --- a/apps/web/src/components/Shared/Modal/Members.tsx +++ b/apps/web/src/components/Shared/Modal/Members.tsx @@ -68,15 +68,19 @@ const Members: FC = ({ address }) => { return ( `${member.address}-${index}`} + computeItemKey={(index, member) => `${member.account.address}-${index}`} data={groupMembers} endReached={onEndReached} itemContent={(_, member) => (
diff --git a/apps/web/src/components/Staff/Accounts/Overview/Tool/AccountOverview.tsx b/apps/web/src/components/Staff/Accounts/Overview/Tool/AccountOverview.tsx index 39e518ce7968..1af9bb91762f 100644 --- a/apps/web/src/components/Staff/Accounts/Overview/Tool/AccountOverview.tsx +++ b/apps/web/src/components/Staff/Accounts/Overview/Tool/AccountOverview.tsx @@ -1,15 +1,6 @@ import MetaDetails from "@components/Shared/MetaDetails"; -import { - BanknotesIcon, - HandRaisedIcon, - HashtagIcon, - PhotoIcon -} from "@heroicons/react/24/outline"; -import { - CheckCircleIcon, - ShieldCheckIcon, - XCircleIcon -} from "@heroicons/react/24/solid"; +import { BanknotesIcon, HashtagIcon } from "@heroicons/react/24/outline"; +import { ShieldCheckIcon } from "@heroicons/react/24/solid"; import formatAddress from "@hey/helpers/formatAddress"; import type { Account } from "@hey/indexer"; import { H5 } from "@hey/ui"; @@ -42,35 +33,6 @@ const AccountOverview: FC = ({ account }) => { > {formatAddress(account.owner)} - {account?.followNftAddress ? ( - } - title="NFT address" - value={account.followNftAddress.address} - > - {formatAddress(account.followNftAddress.address)} - - ) : null} - } - title="Has Lens Manager" - > - {account.signless ? ( - - ) : ( - - )} - - } - title="Gas sponsored" - > - {account.sponsor ? ( - - ) : ( - - )} -
);