diff --git a/packages/atlas/src/components/_crt/RevenueShareWidget/RevenueShareWidget.tsx b/packages/atlas/src/components/_crt/RevenueShareWidget/RevenueShareWidget.tsx
index cafea0f578..56ca34d924 100644
--- a/packages/atlas/src/components/_crt/RevenueShareWidget/RevenueShareWidget.tsx
+++ b/packages/atlas/src/components/_crt/RevenueShareWidget/RevenueShareWidget.tsx
@@ -5,6 +5,7 @@ import {
GetTokenRevenueSharesQuery,
useGetCreatorTokenHoldersQuery,
useGetFullCreatorTokenQuery,
+ useGetRevenueShareDividendQuery,
} from '@/api/queries/__generated__/creatorTokens.generated'
import { SvgActionCalendar, SvgActionLock, SvgJoyTokenMonochrome16 } from '@/assets/icons'
import { Avatar } from '@/components/Avatar'
@@ -45,6 +46,13 @@ export const RevenueShareWidget = ({ tokenName, tokenId, revenueShare, memberId
},
},
})
+ const { data: dividendData, loading: loadingDividendData } = useGetRevenueShareDividendQuery({
+ variables: {
+ tokenId: tokenId,
+ stakingAmount: +(holderData?.tokenAccounts[0]?.totalAmount ?? 0),
+ },
+ skip: !holderData?.tokenAccounts[0] || !tokenId,
+ })
const status = getRevenueShareStatusForMember({
currentBlock,
endingAt: revenueShare.endsAt,
@@ -119,13 +127,17 @@ export const RevenueShareWidget = ({ tokenName, tokenId, revenueShare, memberId
- }
- />
+ {loadingDividendData ? (
+
+ ) : (
+ }
+ />
+ )}