Skip to content

Commit

Permalink
Small overral improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
WRadoslaw committed Dec 12, 2023
1 parent f50aef0 commit baf2ed0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ export const TokenIssuanceStep = ({
<Text variant="t300" as="p" color="colorTextMuted">
{formatNumber((creatorIssueAmount * Number(field.value || 0)) / 100)} ${form.name}
</Text>
) : null
) : (
<div />
)
}
/>
)}
Expand All @@ -176,7 +178,11 @@ export const TokenIssuanceStep = ({
useLayoutEffect(() => {
const data =
assuranceType === 'custom'
? generateChartData(Number(customCliff ?? 0), Number(customVesting ?? 0), firstPayout ? firstPayout : 0)
? generateChartData(
Number(customCliff ?? 0),
Number(customVesting ?? 0),
firstPayout ? Math.min(Math.max(firstPayout, 0), 100) : 0
)
: generateChartData(...(getDataBasedOnType(assuranceType) as [number, number, number]))
setPreview(
<PreviewContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,12 @@ export const CrtHoldersWidget = ({ tokenId, totalSupply, onShowMore }: CrtHolder
)
)
) : (
<SvgHoldersPlaceholder />
<FlexBox gap={2} flow="column">
<SvgHoldersPlaceholder />
<Text variant="t100" as="p" margin={{ left: 2 }} color="colorTextMuted">
No holders yet.
</Text>
</FlexBox>
)}
</FlexBox>
</FlexBox>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import BN from 'bn.js'
import { useCallback, useMemo } from 'react'

import { useGetCreatorTokenHoldersQuery } from '@/api/queries/__generated__/creatorTokens.generated'
Expand All @@ -14,6 +15,7 @@ import { StartSaleOrMarketButton } from '@/components/_crt/StartSaleOrMarketButt
import { absoluteRoutes } from '@/config/routes'
import { useGetTokenBalance } from '@/hooks/useGetTokenBalance'
import { useMediaMatch } from '@/hooks/useMediaMatch'
import { hapiBnToTokenNumber } from '@/joystream-lib/utils'
import { useUser } from '@/providers/user/user.hooks'
import { SentryLogger } from '@/utils/logs'
import { permillToPercentage } from '@/utils/number'
Expand Down Expand Up @@ -136,6 +138,7 @@ export const CrtDashboardMainTab = ({ token, onTabChange, hasOpenedMarket }: Crt
icon={<StyledSvgJoyTokenMonochrome24 />}
withDenomination
withToken
denominationMultiplier={token.lastPrice ? hapiBnToTokenNumber(new BN(token.lastPrice)) : 0}
customTicker={`$${token.symbol}`}
variant="h400"
/>
Expand All @@ -153,6 +156,7 @@ export const CrtDashboardMainTab = ({ token, onTabChange, hasOpenedMarket }: Crt
icon={<StyledSvgJoyTokenMonochrome24 />}
withDenomination
withToken
denominationMultiplier={token.lastPrice ? hapiBnToTokenNumber(new BN(token.lastPrice)) : 0}
customTicker={`$${token.symbol}`}
variant="h400"
/>
Expand All @@ -170,7 +174,6 @@ export const CrtDashboardMainTab = ({ token, onTabChange, hasOpenedMarket }: Crt
icon={<StyledSvgJoyTokenMonochrome24 />}
withDenomination
withToken
customTicker={`$${token.symbol}`}
variant="h400"
/>
}
Expand Down

0 comments on commit baf2ed0

Please sign in to comment.