forked from pancakeswap/pancake-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Past IFOs redirect button (pancakeswap#254)
* feat: Adding Button Menu component * feat: Adding routes * fix: Adjusting the route * style: Removing Card wrapper margins * fix: Adding react router dom link-to * feat: Adding the new structure route * feat: Adding the inactive Ifo Cards * feat: Running prettier * refactor(menu): Update menu links * fix(ifo): Spacing issues with Ifo grid - Added a "finished" state * fix: Menu * fix(ifo): Header image dimensions * fix(ifo): Use external link * build: Upgrade UI Kit * chore: Rebase fixes Co-authored-by: hachiojidev <[email protected]>
- Loading branch information
1 parent
c97ce64
commit 8ed28e8
Showing
20 changed files
with
245 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
import { Text, Heading, BaseLayout, Button, LinkExternal, Flex } from '@pancakeswap-libs/uikit' | ||
import { ifosConfig } from 'config/constants' | ||
import useI18n from 'hooks/useI18n' | ||
import Container from 'components/layout/Container' | ||
import IfoCard from './components/IfoCard' | ||
import Title from './components/Title' | ||
import IfoCards from './components/IfoCards' | ||
|
||
const LaunchIfoCallout = styled(BaseLayout)` | ||
border-top: 2px solid ${({ theme }) => theme.colors.textSubtle}; | ||
display: grid; | ||
grid-template-columns: 1fr; | ||
grid-gap: 32px; | ||
margin: 0 auto; | ||
padding: 32px 0; | ||
${({ theme }) => theme.mediaQueries.sm} { | ||
grid-template-columns: 1fr 1fr; | ||
} | ||
` | ||
|
||
const List = styled.ul` | ||
color: ${({ theme }) => theme.colors.text}; | ||
margin-bottom: 16px; | ||
& > li { | ||
line-height: 1.4; | ||
margin-bottom: 8px; | ||
} | ||
` | ||
|
||
/** | ||
* Note: currently there should be only 1 active IFO at a time | ||
*/ | ||
const activeIfo = ifosConfig.find((ifo) => ifo.isActive) | ||
|
||
const Ifo = () => { | ||
const TranslateString = useI18n() | ||
|
||
return ( | ||
<Container> | ||
<IfoCards isSingle> | ||
<IfoCard ifo={activeIfo} /> | ||
</IfoCards> | ||
<LaunchIfoCallout> | ||
<div> | ||
<Title as="h2">{TranslateString(592, 'How to take part')}</Title> | ||
<Heading mb="16px">{TranslateString(594, 'Before Sale')}:</Heading> | ||
<List> | ||
<li>{TranslateString(596, 'Buy CAKE and BNB tokens')}</li> | ||
<li>{TranslateString(598, 'Get CAKE-BNB LP tokens by adding CAKE and BNB liquidity')}</li> | ||
</List> | ||
<Flex mb="16px"> | ||
<LinkExternal href="https://exchange.pancakeswap.finance/#/swap" mr="16px"> | ||
{TranslateString(999, 'Buy cake')} | ||
</LinkExternal> | ||
<LinkExternal href="https://exchange.pancakeswap.finance/#/add/ETH/0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82"> | ||
{TranslateString(999, 'Get LP tokens')} | ||
</LinkExternal> | ||
</Flex> | ||
<Heading mb="16px">{TranslateString(600, 'During Sale')}:</Heading> | ||
<List> | ||
<li>{TranslateString(602, 'While the sale is live, commit your CAKE-LP tokens to buy the IFO tokens')}</li> | ||
</List> | ||
<Heading mb="16px">{TranslateString(604, 'After Sale')}:</Heading> | ||
<List> | ||
<li>{TranslateString(606, 'Claim the tokens you bought, along with any unspent funds.')}</li> | ||
<li>{TranslateString(608, 'Done!')}</li> | ||
</List> | ||
<Text as="div" pt="16px"> | ||
<Button | ||
as="a" | ||
variant="secondary" | ||
href="https://docs.pancakeswap.finance/core-products/ifo-initial-farm-offering" | ||
> | ||
{TranslateString(610, 'Read more')} | ||
</Button> | ||
</Text> | ||
</div> | ||
<div> | ||
<img src="/images/ifo-bunny.svg" alt="ifo bunny" /> | ||
<div> | ||
<Title as="h2">{TranslateString(512, 'Want to launch your own IFO?')}</Title> | ||
<Text mb={3}> | ||
{TranslateString( | ||
514, | ||
'Launch your project with PancakeSwap, Binance Smart Chain’s most-used AMM project and liquidity provider, to bring your token directly to the most active and rapidly growing community on BSC.', | ||
)} | ||
</Text> | ||
<Button | ||
as="a" | ||
href="https://docs.google.com/forms/d/e/1FAIpQLScGdT5rrVMr4WOWr08pvcroSeuIOtEJf1sVdQGVdcAOqryigQ/viewform" | ||
external | ||
> | ||
{TranslateString(516, 'Apply to launch')} | ||
</Button> | ||
</div> | ||
</div> | ||
</LaunchIfoCallout> | ||
</Container> | ||
) | ||
} | ||
|
||
export default Ifo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react' | ||
import { ifosConfig } from 'config/constants' | ||
import { Ifo } from 'config/constants/types' | ||
import IfoCard from './components/IfoCard' | ||
import IfoCards from './components/IfoCards' | ||
|
||
const inactiveIfo: Ifo[] = ifosConfig.filter((ifo) => !ifo.isActive) | ||
|
||
const PastIfo = () => { | ||
return ( | ||
<IfoCards> | ||
{inactiveIfo.map((ifo) => ( | ||
<IfoCard key={ifo.id} ifo={ifo} /> | ||
))} | ||
</IfoCards> | ||
) | ||
} | ||
|
||
export default PastIfo |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.