From 2aba7ab164d054633863cd806a5c432337f021e3 Mon Sep 17 00:00:00 2001 From: WRadoslaw Date: Mon, 2 Oct 2023 14:43:32 +0200 Subject: [PATCH] Show reward account for channel on studio --- .../_overlays/MemberDropdown/MemberDropdown.tsx | 3 ++- .../_overlays/MemberDropdown/MemberDropdownNav.tsx | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/atlas/src/components/_overlays/MemberDropdown/MemberDropdown.tsx b/packages/atlas/src/components/_overlays/MemberDropdown/MemberDropdown.tsx index 957d96b2ef..35356de567 100644 --- a/packages/atlas/src/components/_overlays/MemberDropdown/MemberDropdown.tsx +++ b/packages/atlas/src/components/_overlays/MemberDropdown/MemberDropdown.tsx @@ -29,7 +29,7 @@ export type MemberDropdownProps = { export const MemberDropdown = forwardRef( ({ publisher, isActive, closeDropdown, onChannelChange }, ref) => { const navigate = useNavigate() - const { channelId, activeMembership, memberships, setActiveChannel } = useUser() + const { channelId, activeMembership, memberships, setActiveChannel, activeChannel } = useUser() const { handleLogout } = useAuth() const { actions: { setAuthModalOpenName }, @@ -169,6 +169,7 @@ export const MemberDropdown = forwardRef( channelBalance={channelBalance} lockedAccountBalance={lockedAccountBalance} activeMembership={activeMembership} + activeChannel={activeChannel} hasOneMember={hasOneMember} onSwitchToList={(type) => handleSwitch(type, true)} onCloseDropdown={closeDropdown} diff --git a/packages/atlas/src/components/_overlays/MemberDropdown/MemberDropdownNav.tsx b/packages/atlas/src/components/_overlays/MemberDropdown/MemberDropdownNav.tsx index 55a5f64295..3cc525c3a8 100644 --- a/packages/atlas/src/components/_overlays/MemberDropdown/MemberDropdownNav.tsx +++ b/packages/atlas/src/components/_overlays/MemberDropdown/MemberDropdownNav.tsx @@ -55,6 +55,7 @@ type MemberDropdownNavProps = { onSignOut: () => void onShowFundsDialog: () => void activeMembership?: FullMembershipFieldsFragment | null + activeChannel?: FullMembershipFieldsFragment['channels'][number] | null hasOneMember?: boolean channelId: string | null accountBalance?: BN @@ -78,6 +79,7 @@ export const MemberDropdownNav: FC = ({ lockedAccountBalance, channelBalance, isInDebt, + activeChannel, }) => { const selectedChannel = activeMembership?.channels.find((chanel) => chanel.id === channelId) const { urls: memberAvatarUrls, isLoadingAsset: memberAvatarLoading } = getMemberAvatar(activeMembership) @@ -173,7 +175,11 @@ export const MemberDropdownNav: FC = ({ - +