|
@@ -1,8 +1,10 @@
|
|
-import { FC, useState } from 'react'
|
|
|
|
|
|
+import { FC, useRef, useState } from 'react'
|
|
|
|
|
|
|
|
+import { Information } from '@/components/Information'
|
|
import { LayoutGrid } from '@/components/LayoutGrid'
|
|
import { LayoutGrid } from '@/components/LayoutGrid'
|
|
import { NumberFormat } from '@/components/NumberFormat'
|
|
import { NumberFormat } from '@/components/NumberFormat'
|
|
import { Text } from '@/components/Text'
|
|
import { Text } from '@/components/Text'
|
|
|
|
+import { TooltipText } from '@/components/Tooltip/Tooltip.styles'
|
|
import { BenefitCard } from '@/components/_ypp/BenefitCard'
|
|
import { BenefitCard } from '@/components/_ypp/BenefitCard'
|
|
import { atlasConfig } from '@/config'
|
|
import { atlasConfig } from '@/config'
|
|
import { useMediaMatch } from '@/hooks/useMediaMatch'
|
|
import { useMediaMatch } from '@/hooks/useMediaMatch'
|
|
@@ -17,6 +19,9 @@ import {
|
|
BenefitsCardButton,
|
|
BenefitsCardButton,
|
|
BenefitsCardsButtonsGroup,
|
|
BenefitsCardsButtonsGroup,
|
|
BenefitsCardsContainerGridItem,
|
|
BenefitsCardsContainerGridItem,
|
|
|
|
+ ColorAnchor,
|
|
|
|
+ RewardsSubtitleGridItem,
|
|
|
|
+ RewardsSubtitleWrapper,
|
|
} from './YppRewardSection.styles'
|
|
} from './YppRewardSection.styles'
|
|
|
|
|
|
export const YppRewardSection: FC = () => {
|
|
export const YppRewardSection: FC = () => {
|
|
@@ -24,6 +29,7 @@ export const YppRewardSection: FC = () => {
|
|
const tiers = atlasConfig.features.ypp.tiersDefinition?.tiers
|
|
const tiers = atlasConfig.features.ypp.tiersDefinition?.tiers
|
|
const rewards = atlasConfig.features.ypp.rewards
|
|
const rewards = atlasConfig.features.ypp.rewards
|
|
const [rewardMultiplier, setRewardMultiplier] = useState<number>(tiers ? tiers[tiers.length - 1].multiplier : 1)
|
|
const [rewardMultiplier, setRewardMultiplier] = useState<number>(tiers ? tiers[tiers.length - 1].multiplier : 1)
|
|
|
|
+ const ref = useRef<HTMLDivElement>(null)
|
|
|
|
|
|
if (!rewards?.length) {
|
|
if (!rewards?.length) {
|
|
return null
|
|
return null
|
|
@@ -159,6 +165,30 @@ export const YppRewardSection: FC = () => {
|
|
)
|
|
)
|
|
})}
|
|
})}
|
|
</BenefitsCardsContainerGridItem>
|
|
</BenefitsCardsContainerGridItem>
|
|
|
|
+ <RewardsSubtitleGridItem colStart={{ base: 6 }} colSpan={{ base: 7, lg: 6 }}>
|
|
|
|
+ <RewardsSubtitleWrapper>
|
|
|
|
+ <Text variant="t200" as="p" color="colorText" margin={{ right: 1 }}>
|
|
|
|
+ Payments are made in {atlasConfig.joystream.tokenTicker} tokens
|
|
|
|
+ </Text>
|
|
|
|
+ <Information
|
|
|
|
+ interactive
|
|
|
|
+ customContent={
|
|
|
|
+ <TooltipText as="span" variant="t100">
|
|
|
|
+ {atlasConfig.joystream.tokenTicker} token is a native crypto asset of Joystream blockchain. It is
|
|
|
|
+ used for platform governance, purchasing NFTs, trading creator tokens, and covering blockchain
|
|
|
|
+ processing fees. They are listed on{' '}
|
|
|
|
+ <ColorAnchor href="https://www.mexc.com/exchange/JOYSTREAM_USDT" target="__blank">
|
|
|
|
+ MEXC
|
|
|
|
+ </ColorAnchor>{' '}
|
|
|
|
+ exchange under "JOYSTREAM" ticker.
|
|
|
|
+ </TooltipText>
|
|
|
|
+ }
|
|
|
|
+ multiline
|
|
|
|
+ reference={ref.current}
|
|
|
|
+ delay={1000}
|
|
|
|
+ />
|
|
|
|
+ </RewardsSubtitleWrapper>
|
|
|
|
+ </RewardsSubtitleGridItem>
|
|
</LayoutGrid>
|
|
</LayoutGrid>
|
|
</StyledLimitedWidthContainer>
|
|
</StyledLimitedWidthContainer>
|
|
</BackgroundContainer>
|
|
</BackgroundContainer>
|