Skip to content

Commit

Permalink
feat: remove some pages
Browse files Browse the repository at this point in the history
  • Loading branch information
malijss committed Sep 4, 2022
1 parent c06340a commit 7bc2621
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 42 deletions.
5 changes: 2 additions & 3 deletions src/components/App/Bonds/mint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import InputBox from 'components/App/Redemption/InputBox'
import { DeiBonder } from 'constants/addresses'
import { DEI_TOKEN, BDEI_TOKEN } from 'constants/tokens'
import InfoBox from 'components/App/Bonds/InfoBox'
import { NavigationTypes } from 'components/StableCoin'
import { ExternalLink } from 'components/Link'

const Container = styled.div`
Expand Down Expand Up @@ -59,7 +58,7 @@ const Description = styled.div`
color: ${({ theme }) => darken(0.4, theme.text1)};
`

export default function Mint({ onSwitch }: { onSwitch: any }) {
export default function Mint() {
const { chainId, account } = useWeb3React()
const toggleWalletModal = useWalletModalToggle()
const isSupportedChainId = useSupportedChainId()
Expand Down Expand Up @@ -184,7 +183,7 @@ export default function Mint({ onSwitch }: { onSwitch: any }) {
onChange={(value: string) => setAmountIn(value)}
title={'From'}
/>
<ArrowDown style={{ cursor: 'pointer' }} onClick={() => onSwitch(NavigationTypes.SWAP)} />
<ArrowDown />

<InputBox
currency={bDeiCurrency}
Expand Down
2 changes: 0 additions & 2 deletions src/components/StableCoin/Navigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ const Item = styled.div<{

export enum NavigationTypes {
MINT = 'MINT',
SWAP = 'SWAP',
REDEEM = 'REDEEM',
}

const NavigationLabels = {
[NavigationTypes.MINT]: 'Mint',
[NavigationTypes.SWAP]: 'Swap',
[NavigationTypes.REDEEM]: 'Redeem',
}

Expand Down
40 changes: 3 additions & 37 deletions src/pages/deibonds/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import React, { useState } from 'react'
import React from 'react'
import styled from 'styled-components'

import Hero, { HeroSubtext } from 'components/Hero'
import Hero from 'components/Hero'
import Disclaimer from 'components/Disclaimer'
import { Navigation, NavigationTypes } from 'components/StableCoin'
import Mint from 'components/App/Bonds/mint'
import Redeem from 'components/App/Bonds/redeem'
import Swap from 'components/App/Bonds/swap'

const Container = styled.div`
display: flex;
Expand All @@ -15,44 +12,13 @@ const Container = styled.div`
margin: 0 auto;
`

const SelectorContainer = styled.div`
display: flex;
flex-flow: column nowrap;
overflow: visible;
margin: 0 auto;
margin-top: 24px;
padding-right: 24px;
`

export default function Bonds() {
const [selected, setSelected] = useState<NavigationTypes>(NavigationTypes.MINT)

const getAppComponent = (): JSX.Element => {
if (selected == NavigationTypes.MINT) {
return <Mint onSwitch={setSelected} />
}
if (selected == NavigationTypes.SWAP) {
return <Swap onSwitch={setSelected} />
}
if (selected == NavigationTypes.REDEEM) {
return <Redeem />
}
return <Mint onSwitch={setSelected} />
}

return (
<Container>
<Hero>
<div>DEI Bonds</div>
<HeroSubtext>Mint and Swap bDEI</HeroSubtext>
</Hero>

<SelectorContainer>
<Navigation selected={selected} setSelected={setSelected} />
</SelectorContainer>

{getAppComponent()}

<Mint />
<Disclaimer />
</Container>
)
Expand Down

2 comments on commit 7bc2621

@vercel
Copy link

@vercel vercel bot commented on 7bc2621 Sep 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 7bc2621 Sep 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

legacy-dei-interface – ./

legacy-dei-interface-deus-finance.vercel.app
legacy-dei-interface-git-main-deus-finance.vercel.app
legacy.dei.finance

Please sign in to comment.