-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- Before opening a pull request, please read the [contributing guidelines](https://github.com/pancakeswap/pancake-frontend/blob/develop/CONTRIBUTING.md) first --> <!-- start pr-codex --> --- ## PR-Codex overview This PR primarily focuses on adding support for the `SOLV` token launch (IFO) on PancakeSwap, including updates to configuration, new components, and enhancements in the vesting logic. ### Detailed summary - Added `SOLV` token launch configuration in `packages/ifos/src/constants/ifos/bsc.ts`. - Introduced `AdSolv` component for promotional ads. - Updated `Claim` component to include vesting status. - Enhanced vesting logic to track user claimable amounts. - Modified various hooks and components to integrate `SOLV` IFO data. - Updated localization strings for `SOLV` IFO. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
- Loading branch information
Showing
27 changed files
with
756 additions
and
398 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { useTranslation } from '@pancakeswap/localization' | ||
import { BodyText } from '../BodyText' | ||
import { AdButton } from '../Button' | ||
import { AdCard } from '../Card' | ||
import { Countdown } from '../Countdown' | ||
import { AdPlayerProps } from '../types' | ||
import { getImageUrl } from '../utils' | ||
|
||
export const AdSolv = (props: AdPlayerProps) => { | ||
const { t } = useTranslation() | ||
|
||
return ( | ||
<AdCard imageUrl={getImageUrl('solv')} {...props}> | ||
<BodyText mb="8px"> | ||
{t('%token% IFO starts in', { | ||
token: 'SOLV', | ||
})} | ||
</BodyText> | ||
|
||
<Countdown | ||
targetTime={new Date('2025-01-16T10:00:00Z').getTime() / 1000} | ||
subtleColor="rgba(0,0,0,.6)" | ||
background="linear-gradient(180deg, #FCC631 0%, #FF9D00 100%)" | ||
color="black" | ||
mb="8px" | ||
/> | ||
|
||
<AdButton variant="text" isExternalLink href="https://pancakeswap.finance/ifo"> | ||
{t('Get Started')} | ||
</AdButton> | ||
</AdCard> | ||
) | ||
} |
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
62 changes: 62 additions & 0 deletions
62
apps/web/src/components/PhishingWarningBanner/SolvStrip.tsx
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,62 @@ | ||
import { useTranslation } from '@pancakeswap/localization' | ||
import { Box, Link, Text } from '@pancakeswap/uikit' | ||
import { VerticalDivider } from '@pancakeswap/widgets-internal' | ||
|
||
const TextHighlight = ({ text, highlights }: { text: string; highlights: string[] }) => { | ||
const prts = text.split(new RegExp(`(${highlights.join('|')})`, 'g')) | ||
return prts.map((prt, i) => { | ||
const key = `${prt}-${i}` | ||
if (highlights.includes(prt)) { | ||
return ( | ||
<Text bold as="span" color="#FCC631" fontSize={['12px', '12px', '14px']} key={key}> | ||
{prt} | ||
</Text> | ||
) | ||
} | ||
return ( | ||
<Text bold as="span" color="#FFFFFF" fontSize={['12px', '12px', '14px']} key={key}> | ||
{prt} | ||
</Text> | ||
) | ||
}) | ||
} | ||
export const SolvStrip = () => { | ||
const { t } = useTranslation() | ||
|
||
return ( | ||
<Box mr={['6px']}> | ||
<TextHighlight | ||
text={t('Join the SOLV Token Launch (IFO) on BNB Chain PancakeSwap')} | ||
highlights={['SOLV', 'PancakeSwap']} | ||
/>{' '} | ||
<Link | ||
external | ||
display="inline !important" | ||
fontSize={['12px', '12px', '14px']} | ||
href="https://pancakeswap.finance/ifo" | ||
> | ||
{t('Join Now')} | ||
</Link> | ||
<VerticalDivider | ||
bg="#53DEE9" | ||
style={{ | ||
display: 'inline-block', | ||
verticalAlign: 'middle', | ||
height: '18px', | ||
opacity: 0.4, | ||
width: '1px', | ||
marginLeft: '0px', | ||
marginRight: '8px', | ||
}} | ||
/> | ||
<Link | ||
external | ||
display="inline !important" | ||
fontSize={['12px', '12px', '14px']} | ||
href="https://forum.pancakeswap.finance/t/solv-ifo-discussion-thread/993" | ||
> | ||
{t('Learn More')} | ||
</Link> | ||
</Box> | ||
) | ||
} |
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 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
Oops, something went wrong.