Skip to content

Commit

Permalink
Formatting + icons
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinciarka committed Sep 18, 2024
1 parent 1579dce commit 0d21837
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions features/sky/components/SwapCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { zero } from 'helpers/zero'
import React, { useMemo, useState } from 'react'
import { combineLatest, of } from 'rxjs'
import { exchange } from 'theme/icons'
import { Box, Button, Card, Flex, Heading, Spinner } from 'theme-ui'
import { Box, Button, Card, Flex, Heading, Spinner, Text } from 'theme-ui'

export type SwapCardType = {
config: (typeof skySwapTokensConfig)[number]
Expand Down Expand Up @@ -125,6 +125,7 @@ export const SwapCardWrapper = ({
reloadingTokenInfo,
depositAction,
})
const viewPrimaryToken = resolvedPrimaryTokenData.token.replace('SUS', 'sUS')
return (
<Card
sx={{
Expand Down Expand Up @@ -158,9 +159,9 @@ export const SwapCardWrapper = ({
>
{config.stake
? isTokenSwapped
? `Unstake ${resolvedPrimaryTokenData.token}`
: `Stake ${resolvedPrimaryTokenData.token}`
: `Upgrade ${resolvedPrimaryTokenData.token} to ${resolvedSecondaryTokenData.token}`}
? `Unstake ${viewPrimaryToken}`
: `Stake ${viewPrimaryToken}`
: `Upgrade ${viewPrimaryToken} to ${resolvedSecondaryTokenData.token}`}
</Heading>
<Icon
icon={exchange}
Expand All @@ -169,6 +170,11 @@ export const SwapCardWrapper = ({
sx={{ cursor: 'pointer' }}
/>
</Flex>
<Box sx={{ pt: 1, pb: 4 }}>
<Text variant="paragraph4" color="neutral80">
{!isTokenSwapped ? config.descriptionPrimary : config.descriptionSecondary}
</Text>
</Box>
<VaultActionInput
action={
config.stake
Expand Down Expand Up @@ -270,7 +276,7 @@ export const SwapCardWrapper = ({
mt: 3,
}}
messages={[
`Current allowance is ${resolvedPrimaryTokenData.allowance} ${resolvedPrimaryTokenData.token}. You need to update allowance.`,
`Current allowance is ${resolvedPrimaryTokenData.allowance} ${viewPrimaryToken}. You need to update allowance.`,
]}
type="error"
withBullet={false}
Expand Down
2 changes: 1 addition & 1 deletion pages/[networkOrProduct]/sky/upgrade.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function SkySwapPage() {
<Container variant="vaultPageContainer">
<VaultHeadline
header={'Sky Ecosystem Token Upgrades'}
tokens={['SKY']}
tokens={['SKY', 'USDS', 'SUSDS']}
details={[]}
/>
<Grid gap={3} columns={3} mt={[1, 3]}>
Expand Down

0 comments on commit 0d21837

Please sign in to comment.