From 42b382398e1dc413df6510a78cc358e575f1a49b Mon Sep 17 00:00:00 2001 From: gary <1032230992@qq.com> Date: Tue, 12 Apr 2022 15:58:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Menu/config.ts | 172 +++++++++--------- src/views/Farms/Farms.tsx | 14 -- src/views/Home/Home.tsx | 10 +- src/views/Home/components/FarmStakingCard.tsx | 1 + src/views/Home/components/LotteryBanner.tsx | 140 -------------- src/views/Pools/index.tsx | 8 - 6 files changed, 91 insertions(+), 254 deletions(-) delete mode 100644 src/views/Home/components/LotteryBanner.tsx diff --git a/src/components/Menu/config.ts b/src/components/Menu/config.ts index f8e895d..990263c 100644 --- a/src/components/Menu/config.ts +++ b/src/components/Menu/config.ts @@ -19,10 +19,10 @@ const config: (t: ContextApi['t']) => MenuEntry[] = (t) => [ label: t('Liquidity'), href: '/pool', }, - { - label: t('LP Migration'), - href: 'https://v1exchange.pancakeswap.finance/#/migrate', - }, + // { + // label: t('LP Migration'), + // href: 'https://v1exchange.pancakeswap.finance/#/migrate', + // }, ], }, { @@ -35,88 +35,88 @@ const config: (t: ContextApi['t']) => MenuEntry[] = (t) => [ icon: 'PoolIcon', href: '/pools', }, - { - label: t('Prediction (BETA)'), - icon: 'PredictionsIcon', - href: '/prediction', - }, - { - label: t('Lottery'), - icon: 'TicketIcon', - href: '/lottery', - status: { - text: t('Win').toLocaleUpperCase(), - color: 'success', - }, - }, - { - label: t('Collectibles'), - icon: 'NftIcon', - href: '/collectibles', - }, - { - label: t('Team Battle'), - icon: 'TeamBattleIcon', - href: '/competition', - }, - { - label: t('Teams & Profile'), - icon: 'GroupsIcon', - items: [ - { - label: t('Leaderboard'), - href: '/teams', - }, - { - label: t('Task Center'), - href: '/profile/tasks', - }, - { - label: t('Your Profile'), - href: '/profile', - }, - ], - }, - { - label: t('Info'), - icon: 'InfoIcon', - href: 'https://pancakeswap.info', - }, - { - label: t('IFO'), - icon: 'IfoIcon', - href: '/ifo', - }, - { - label: t('More'), - icon: 'MoreIcon', - items: [ - { - label: t('Contact'), - href: 'https://docs.pancakeswap.finance/contact-us', - }, - { - label: t('Voting'), - href: '/voting', - }, - { - label: t('Github'), - href: 'https://github.com/pancakeswap', - }, - { - label: t('Docs'), - href: 'https://docs.pancakeswap.finance', - }, - { - label: t('Blog'), - href: 'https://pancakeswap.medium.com', - }, - { - label: t('Merch'), - href: 'https://pancakeswap.creator-spring.com/', - }, - ], - }, + // { + // label: t('Prediction (BETA)'), + // icon: 'PredictionsIcon', + // href: '/prediction', + // }, + // { + // label: t('Lottery'), + // icon: 'TicketIcon', + // href: '/lottery', + // status: { + // text: t('Win').toLocaleUpperCase(), + // color: 'success', + // }, + // }, + // { + // label: t('Collectibles'), + // icon: 'NftIcon', + // href: '/collectibles', + // }, + // { + // label: t('Team Battle'), + // icon: 'TeamBattleIcon', + // href: '/competition', + // }, + // { + // label: t('Teams & Profile'), + // icon: 'GroupsIcon', + // items: [ + // { + // label: t('Leaderboard'), + // href: '/teams', + // }, + // { + // label: t('Task Center'), + // href: '/profile/tasks', + // }, + // { + // label: t('Your Profile'), + // href: '/profile', + // }, + // ], + // }, + // { + // label: t('Info'), + // icon: 'InfoIcon', + // href: 'https://pancakeswap.info', + // }, + // { + // label: t('IFO'), + // icon: 'IfoIcon', + // href: '/ifo', + // }, + // { + // label: t('More'), + // icon: 'MoreIcon', + // items: [ + // { + // label: t('Contact'), + // href: 'https://docs.pancakeswap.finance/contact-us', + // }, + // { + // label: t('Voting'), + // href: '/voting', + // }, + // { + // label: t('Github'), + // href: 'https://github.com/pancakeswap', + // }, + // { + // label: t('Docs'), + // href: 'https://docs.pancakeswap.finance', + // }, + // { + // label: t('Blog'), + // href: 'https://pancakeswap.medium.com', + // }, + // { + // label: t('Merch'), + // href: 'https://pancakeswap.creator-spring.com/', + // }, + // ], + // }, ] export default config diff --git a/src/views/Farms/Farms.tsx b/src/views/Farms/Farms.tsx index d1caa90..00635b9 100644 --- a/src/views/Farms/Farms.tsx +++ b/src/views/Farms/Farms.tsx @@ -93,11 +93,6 @@ const ViewControls = styled.div` } ` -const StyledImage = styled(Image)` - margin-left: auto; - margin-right: auto; - margin-top: 58px; -` const NUMBER_OF_FARMS_VISIBLE = 12 const getDisplayApr = (cakeRewardsApr?: number, lpRewardsApr?: number) => { @@ -382,14 +377,6 @@ const Farms: React.FC = () => { {t('Stake LP tokens to earn.')} - - - @@ -438,7 +425,6 @@ const Farms: React.FC = () => { {renderContent()}
- ) diff --git a/src/views/Home/Home.tsx b/src/views/Home/Home.tsx index f77a3e1..fa35487 100644 --- a/src/views/Home/Home.tsx +++ b/src/views/Home/Home.tsx @@ -10,7 +10,6 @@ import EarnAPRCard from 'views/Home/components/EarnAPRCard' import EarnAssetCard from 'views/Home/components/EarnAssetCard' import PredictionPromotionCard from 'views/Home/components/PredictionPromotionCard' import LotteryPromotionCard from 'views/Home/components/LotteryPromotionCard' -import LotteryBanner from 'views/Home/components/LotteryBanner' import useFetchLotteryForPromos from 'views/Home/hooks/useFetchLotteryForPromos' const Hero = styled.div` @@ -92,7 +91,6 @@ const Home: React.FC = () => { return ( <> - @@ -101,10 +99,10 @@ const Home: React.FC = () => { {t('The #1 AMM and yield farm on Binance Smart Chain.')}
- - - - + {/* */} + + {/* */} + {/* */} diff --git a/src/views/Home/components/FarmStakingCard.tsx b/src/views/Home/components/FarmStakingCard.tsx index 1d0f7ff..adca805 100644 --- a/src/views/Home/components/FarmStakingCard.tsx +++ b/src/views/Home/components/FarmStakingCard.tsx @@ -16,6 +16,7 @@ const StyledFarmStakingCard = styled(Card)` background-repeat: no-repeat; background-position: top right; min-height: 376px; + margin-bottom: 24px; ` const Block = styled.div` diff --git a/src/views/Home/components/LotteryBanner.tsx b/src/views/Home/components/LotteryBanner.tsx deleted file mode 100644 index 6db589e..0000000 --- a/src/views/Home/components/LotteryBanner.tsx +++ /dev/null @@ -1,140 +0,0 @@ -import React from 'react' -import styled from 'styled-components' -import { Text, Flex, Button, ArrowForwardIcon, Skeleton } from '@pancakeswap/uikit' -import { useTranslation } from 'contexts/Localization' -import Container from 'components/Layout/Container' -import { NavLink } from 'react-router-dom' -import Balance from 'components/Balance' -import { usePriceCakeBusd } from 'state/hooks' -import { getBalanceNumber } from 'utils/formatBalance' - -const NowLive = styled(Text)` - background: -webkit-linear-gradient(#ffd800, #eb8c00); - font-size: 24px; - font-weight: 600; - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; -` - -const Wrapper = styled.div` - background-image: linear-gradient(#7645d9, #452a7a); - max-height: max-content; - overflow: hidden; - ${({ theme }) => theme.mediaQueries.md} { - max-height: 256px; - } -` - -const Inner = styled(Container)` - display: flex; - flex-direction: column-reverse; - - ${({ theme }) => theme.mediaQueries.sm} { - flex-direction: row; - } -` - -const LeftWrapper = styled(Flex)` - flex-direction: column; - flex: 1; - padding-bottom: 40px; - padding-top: 24px; - ${({ theme }) => theme.mediaQueries.sm} { - padding-top: 40px; - } -` - -const RightWrapper = styled.div` - display: flex; - align-items: center; - justify-content: center; - flex: 0.5; - - & img { - width: 80%; - margin-top: 24px; - } - - ${({ theme }) => theme.mediaQueries.sm} { - & img { - margin-top: 0; - } - } - - ${({ theme }) => theme.mediaQueries.md} { - flex: 0.8; - } - - ${({ theme }) => theme.mediaQueries.lg} { - & img { - margin-top: -25px; - } - } -` - -const PrizeFlex = styled(Flex)` - flex-direction: row; - flex-wrap: wrap; - margin-bottom: 8px; - - ${({ theme }) => theme.mediaQueries.sm} { - max-width: 640px; - } -` - -const Over = styled(Text)` - :empty { - margin-right: 0; - } -` - -const LotteryBanner: React.FC<{ currentLotteryPrize: string }> = ({ currentLotteryPrize }) => { - const { t } = useTranslation() - const cakePriceBusd = usePriceCakeBusd() - const prizeInBusd = cakePriceBusd.times(currentLotteryPrize) - const prizeTotal = getBalanceNumber(prizeInBusd) - - const prizeTotalText = prizeInBusd.isNaN() ? prizeTotal.toString() : '-' - const prizeText = t('Over %amount% in Prizes!', { amount: prizeTotalText }) - const [over, inPrizes] = prizeText.split(prizeTotalText) - - return ( - - - - {t('Lottery Now Live')} - - - {over} - - <> - {prizeInBusd.isNaN() ? ( - <> - - - ) : ( - - )} - - - {inPrizes} - - - - - - - - lottery bunny - - - - ) -} - -export default LotteryBanner diff --git a/src/views/Pools/index.tsx b/src/views/Pools/index.tsx index 7727f96..08dfa02 100644 --- a/src/views/Pools/index.tsx +++ b/src/views/Pools/index.tsx @@ -280,14 +280,6 @@ const Pools: React.FC = () => { )} {viewMode === ViewMode.CARD ? cardLayout : tableLayout}
- Pancake illustration )