Skip to content

Commit

Permalink
Small styling improvements on revenue share tab
Browse files Browse the repository at this point in the history
  • Loading branch information
WRadoslaw committed Dec 13, 2023
1 parent baf2ed0 commit 3363aec
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions packages/atlas/src/views/studio/CrtDashboard/tabs/CrtRevenueTab.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import styled from '@emotion/styled'
import { BN } from 'bn.js'
import { useMemo, useState } from 'react'

Expand Down Expand Up @@ -39,7 +40,7 @@ export const CrtRevenueTab = ({ token }: CrtRevenueTabProps) => {
<>
<LayoutGrid>
<GridItem colSpan={{ base: 12, sm: 4 }}>
<RevenueShareStateWidget revenueShare={activeRevenueShare} />
<StyledRevenueShareStateWidget revenueShare={activeRevenueShare} />
</GridItem>
<GridItem colSpan={{ base: 12, sm: 4 }}>
<WidgetTile
Expand Down Expand Up @@ -86,17 +87,19 @@ export const CrtRevenueTab = ({ token }: CrtRevenueTabProps) => {
tokenId={token.id}
/>
</GridItem>
<GridItem colSpan={{ base: 12 }}>
<RevenueShareStakersTable
data={activeRevenueShare.stakers.map((staker) => ({
memberId: staker.account.member.id,
stakedAtBlock: staker.createdIn,
staked: +(staker.stakedAmount ?? 0),
earnings: new BN(staker.earnings ?? 0),
}))}
tokenSymbol={token.symbol}
/>
</GridItem>
{activeRevenueShare.stakers.length ? (
<GridItem colSpan={{ base: 12 }}>
<RevenueShareStakersTable
data={activeRevenueShare.stakers.map((staker) => ({
memberId: staker.account.member.id,
stakedAtBlock: staker.createdIn,
staked: +(staker.stakedAmount ?? 0),
earnings: new BN(staker.earnings ?? 0),
}))}
tokenSymbol={token.symbol}
/>
</GridItem>
) : null}
</>
) : finalizedRevenueShares.length ? null : (
<GridItem colSpan={{ base: 12 }}>
Expand Down Expand Up @@ -124,3 +127,7 @@ export const CrtRevenueTab = ({ token }: CrtRevenueTabProps) => {
</>
)
}

const StyledRevenueShareStateWidget = styled(RevenueShareStateWidget)`
height: 100%;
`

0 comments on commit 3363aec

Please sign in to comment.