From 7ee26efb6b0a5c6715cf2fda9697e3c947fbe2e7 Mon Sep 17 00:00:00 2001 From: myf <> Date: Thu, 9 Jun 2022 17:46:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Menu/config.ts | 4 +- src/views/Bazaar/components/AuctionRecord.tsx | 2 +- src/views/Bazaar/components/AuctionRule.tsx | 90 +------------------ src/views/Bazaar/components/AuctionTable.tsx | 60 +------------ src/views/Bazaar/components/Content.tsx | 8 +- src/views/Bazaar/components/ContentShop.tsx | 1 + src/views/Bazaar/components/FlexCom.tsx | 1 - src/views/Bazaar/components/SellModal.tsx | 3 +- src/views/Bazaar/components/ShopDetail.tsx | 2 +- src/views/Bazaar/components/ShopList.tsx | 4 +- .../Bazaar/components/TransactionRecord.tsx | 2 +- .../Bazaar/components/TransactionTable.tsx | 53 +---------- src/views/Compound/components/CompoundBox.tsx | 4 +- src/views/Compound/components/ShopList.tsx | 6 +- 14 files changed, 18 insertions(+), 222 deletions(-) diff --git a/src/components/Menu/config.ts b/src/components/Menu/config.ts index b911515..46813b4 100644 --- a/src/components/Menu/config.ts +++ b/src/components/Menu/config.ts @@ -9,7 +9,7 @@ const config: (t: ContextApi['t']) => MenuEntry[] = (t) => [ }, { label: t('IDO Exchange'), - icon: 'FarmIcon', + icon: 'Ido', href: '/Ido', }, { @@ -19,7 +19,7 @@ const config: (t: ContextApi['t']) => MenuEntry[] = (t) => [ }, { label: t('nft compound'), - icon: 'NFTBox', + icon: 'Compound', href: '/compound', }, { diff --git a/src/views/Bazaar/components/AuctionRecord.tsx b/src/views/Bazaar/components/AuctionRecord.tsx index 4a2d679..335953e 100644 --- a/src/views/Bazaar/components/AuctionRecord.tsx +++ b/src/views/Bazaar/components/AuctionRecord.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react' import styled from 'styled-components' -import { Text, Button, Image, InputProps, Flex, Link } from '@pancakeswap/uikit' +import { Text, Button, Image, Flex } from '@pancakeswap/uikit' import { useTranslation } from 'contexts/Localization' interface AuctionRecordProps { diff --git a/src/views/Bazaar/components/AuctionRule.tsx b/src/views/Bazaar/components/AuctionRule.tsx index 50f65af..36b4a72 100644 --- a/src/views/Bazaar/components/AuctionRule.tsx +++ b/src/views/Bazaar/components/AuctionRule.tsx @@ -1,14 +1,8 @@ -import React, { useState } from 'react' +import React from 'react' import styled from 'styled-components' -import { Text, Button, Image, InputProps, Flex, Link } from '@pancakeswap/uikit' +import { Text, Button, Image, Flex } from '@pancakeswap/uikit' import { useTranslation } from 'contexts/Localization' -interface TableProps { - title?: string - th?: string[] - tr?: any -} - const FlexMain = styled.div` margin-top: 30px; padding: 34px 30px; @@ -28,86 +22,6 @@ const DetailText = styled(Text)` margin-bottom: 6px; ` -const TypeFlex = styled(Flex)` - flex-wrap: wrap; - align-items: center; - margin-top: 35px; - padding-left: 30px; - & > .active { - background: linear-gradient(90deg, #1fd4b0 0%, #1fc9d3 100%); - color: #fff; - } -` -const TypeItem = styled(Flex)` - width: 128px; - height: 42px; - border: 1px solid #1fc7d4; - border-radius: 30px; - align-items: center; - justify-content: center; - font-size: 12px; - color: #1fc7d4; - margin-right: 15px; - cursor: pointer; -` -const TableThemed = styled(Flex)` - height: 42px; - align-items: center; - /* flex-wrap: wrap; */ -` -const ThemedItem = styled.div` - width: 100%; - height: 42px; - line-height: 42px; - text-align: center; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - font-size: 16px; - color: #666666; - border-top: 1px solid #e3e3e3; -` -const TableBody = styled.div`` -const TrFlex = styled(Flex)` - height: 42px; - border-top: 1px solid #e3e3e3; - align-items: center; - /* flex-wrap: wrap; */ -` -const TdFlex = styled(Flex)` - align-items: center; - justify-content: center; - width: 100%; - color: #666666; - font-size: 16px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -` -const TdImage = styled(Image)` - margin-right: 20px; -` -const TdBtnFlex = styled(Flex)` - width: 197px; - flex-direction: column; - justify-content: center; - align-items: center; -` -const DetailButton = styled(Button)` - width: 80px; - height: 30px; - background: linear-gradient(90deg, #1fd4b0 0%, #1fc9d3 100%); - border-radius: 30px; - font-size: 12px; -` -const HashText = styled(Text)` - cursor: pointer; - font-size: 14px; - color: #1fc7d4; - margin-top: 5px; - border-bottom: 1px solid #1fc7d4; -` - const AuctionRule: React.FC = () => { const { t } = useTranslation() diff --git a/src/views/Bazaar/components/AuctionTable.tsx b/src/views/Bazaar/components/AuctionTable.tsx index cf56361..6ade69d 100644 --- a/src/views/Bazaar/components/AuctionTable.tsx +++ b/src/views/Bazaar/components/AuctionTable.tsx @@ -1,14 +1,8 @@ import React, { useState } from 'react' import styled from 'styled-components' -import { Text, Button, Image, InputProps, Flex, Link } from '@pancakeswap/uikit' +import { Text, Flex } from '@pancakeswap/uikit' import { useTranslation } from 'contexts/Localization' -interface TableProps { - title?: string - th?: string[] - tr?: any -} - const FlexMain = styled.div` margin-top: 30px; height: 405px; @@ -21,12 +15,6 @@ const FlexMain = styled.div` box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.16); border-radius: 20px; ` -const CloseImage = styled(Image)` - cursor: pointer; - position: absolute; - top: 30px; - right: 30px; -` const HeaderText = styled(Text)` font-size: 24px; color: #333333; @@ -34,32 +22,9 @@ const HeaderText = styled(Text)` padding: 30px 0; ` -const TypeFlex = styled(Flex)` - flex-wrap: wrap; - align-items: center; - margin-top: 35px; - padding-left: 30px; - & > .active { - background: linear-gradient(90deg, #1fd4b0 0%, #1fc9d3 100%); - color: #fff; - } -` -const TypeItem = styled(Flex)` - width: 128px; - height: 42px; - border: 1px solid #1fc7d4; - border-radius: 30px; - align-items: center; - justify-content: center; - font-size: 12px; - color: #1fc7d4; - margin-right: 15px; - cursor: pointer; -` const TableThemed = styled(Flex)` height: 42px; align-items: center; - /* flex-wrap: wrap; */ ` const ThemedItem = styled.div` width: 100%; @@ -90,29 +55,6 @@ const TdFlex = styled(Flex)` white-space: nowrap; text-overflow: ellipsis; ` -const TdImage = styled(Image)` - margin-right: 20px; -` -const TdBtnFlex = styled(Flex)` - width: 197px; - flex-direction: column; - justify-content: center; - align-items: center; -` -const DetailButton = styled(Button)` - width: 80px; - height: 30px; - background: linear-gradient(90deg, #1fd4b0 0%, #1fc9d3 100%); - border-radius: 30px; - font-size: 12px; -` -const HashText = styled(Text)` - cursor: pointer; - font-size: 14px; - color: #1fc7d4; - margin-top: 5px; - border-bottom: 1px solid #1fc7d4; -` const AuctionTable: React.FC = () => { const { t } = useTranslation() diff --git a/src/views/Bazaar/components/Content.tsx b/src/views/Bazaar/components/Content.tsx index 8620348..1454515 100644 --- a/src/views/Bazaar/components/Content.tsx +++ b/src/views/Bazaar/components/Content.tsx @@ -164,13 +164,9 @@ const Content: React.FC = () => { ] const [statusIndex, setStatusIndex] = useState(0) - const cutStatus = (index) => { - setStatusIndex(index) - } - const handleChange = (evt: React.ChangeEvent) => { - const { value: inputValue } = evt.target - setSearchTitle(inputValue) + const { value } = evt.target + setSearchTitle(value) } const searchList = () => { console.log('search') diff --git a/src/views/Bazaar/components/ContentShop.tsx b/src/views/Bazaar/components/ContentShop.tsx index dcc7dbb..f57042a 100644 --- a/src/views/Bazaar/components/ContentShop.tsx +++ b/src/views/Bazaar/components/ContentShop.tsx @@ -62,6 +62,7 @@ const FooterValue = styled(Text)` const ContentShop: React.FC = ({ list, getDetail }) => { const { t } = useTranslation() + const showDetail = () => { getDetail() } diff --git a/src/views/Bazaar/components/FlexCom.tsx b/src/views/Bazaar/components/FlexCom.tsx index d609d70..00ba00f 100644 --- a/src/views/Bazaar/components/FlexCom.tsx +++ b/src/views/Bazaar/components/FlexCom.tsx @@ -35,7 +35,6 @@ const FlexCom: React.FC = ({ rightSize = '14px', }) => { const openPage = () => { - console.log(typeLink) window.open(typeLink) } diff --git a/src/views/Bazaar/components/SellModal.tsx b/src/views/Bazaar/components/SellModal.tsx index 3ae93af..d9d8c3f 100644 --- a/src/views/Bazaar/components/SellModal.tsx +++ b/src/views/Bazaar/components/SellModal.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react' import styled from 'styled-components' -import { Text, Button, Image, Input, Flex, Link, Dropdown, useModal } from '@pancakeswap/uikit' +import { Text, Button, Image, Input, Flex, Dropdown } from '@pancakeswap/uikit' import { useTranslation } from 'contexts/Localization' import ShopList from './ShopList' import ShopModal from './ShopModal' @@ -266,7 +266,6 @@ const SellModal: React.FC = ({ onDismiss }) => { setTradingOnList([...tradingOnList]) } - // const [onShopDetail] = useModal() const onSelectNft = () => { setShowModal(!showModal) } diff --git a/src/views/Bazaar/components/ShopDetail.tsx b/src/views/Bazaar/components/ShopDetail.tsx index 538fd08..5eb4fa4 100644 --- a/src/views/Bazaar/components/ShopDetail.tsx +++ b/src/views/Bazaar/components/ShopDetail.tsx @@ -109,7 +109,7 @@ const ShopDetail: React.FC = ({ close }) => { Cat goddess Emerald .epicBcg { @@ -29,8 +29,6 @@ const MainFlex = styled.div` ` const ShopItem = styled(Flex)` - /* height: 358px; */ - /* border-radius: 20px; */ background: rgba(255, 255, 255, 0.39); box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.15); flex-direction: column; diff --git a/src/views/Bazaar/components/TransactionRecord.tsx b/src/views/Bazaar/components/TransactionRecord.tsx index 2c48ab1..60a2791 100644 --- a/src/views/Bazaar/components/TransactionRecord.tsx +++ b/src/views/Bazaar/components/TransactionRecord.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react' import styled from 'styled-components' -import { Text, Button, Image, InputProps, Flex, Link } from '@pancakeswap/uikit' +import { Text, Button, Image, Flex } from '@pancakeswap/uikit' import { useTranslation } from 'contexts/Localization' interface TransactionRecordProps { diff --git a/src/views/Bazaar/components/TransactionTable.tsx b/src/views/Bazaar/components/TransactionTable.tsx index e017f0c..b04ff4d 100644 --- a/src/views/Bazaar/components/TransactionTable.tsx +++ b/src/views/Bazaar/components/TransactionTable.tsx @@ -1,14 +1,8 @@ import React, { useState } from 'react' import styled from 'styled-components' -import { Text, Button, Image, InputProps, Flex, Link } from '@pancakeswap/uikit' +import { Text, Flex } from '@pancakeswap/uikit' import { useTranslation } from 'contexts/Localization' -interface TransactionTableProps { - title?: string - th?: string[] - tr?: any -} - const FlexMain = styled.div` margin-top: 30px; height: 405px; @@ -28,28 +22,6 @@ const HeaderText = styled(Text)` padding: 30px 0; ` -const TypeFlex = styled(Flex)` - flex-wrap: wrap; - align-items: center; - margin-top: 35px; - padding-left: 30px; - & > .active { - background: linear-gradient(90deg, #1fd4b0 0%, #1fc9d3 100%); - color: #fff; - } -` -const TypeItem = styled(Flex)` - width: 128px; - height: 42px; - border: 1px solid #1fc7d4; - border-radius: 30px; - align-items: center; - justify-content: center; - font-size: 12px; - color: #1fc7d4; - margin-right: 15px; - cursor: pointer; -` const TableThemed = styled(Flex)` height: 42px; align-items: center; @@ -82,29 +54,6 @@ const TdFlex = styled(Flex)` white-space: nowrap; text-overflow: ellipsis; ` -const TdImage = styled(Image)` - margin-right: 20px; -` -const TdBtnFlex = styled(Flex)` - width: 197px; - flex-direction: column; - justify-content: center; - align-items: center; -` -const DetailButton = styled(Button)` - width: 80px; - height: 30px; - background: linear-gradient(90deg, #1fd4b0 0%, #1fc9d3 100%); - border-radius: 30px; - font-size: 12px; -` -const HashText = styled(Text)` - cursor: pointer; - font-size: 14px; - color: #1fc7d4; - margin-top: 5px; - border-bottom: 1px solid #1fc7d4; -` const TransactionTable: React.FC = () => { const { t } = useTranslation() diff --git a/src/views/Compound/components/CompoundBox.tsx b/src/views/Compound/components/CompoundBox.tsx index 96597b1..9aead86 100644 --- a/src/views/Compound/components/CompoundBox.tsx +++ b/src/views/Compound/components/CompoundBox.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react' -import styled, { keyframes } from 'styled-components' +import styled from 'styled-components' import { useTranslation } from 'contexts/Localization' -import { Text, Flex, Button, Image, useModal } from '@pancakeswap/uikit' +import { Text, Flex, Button, useModal } from '@pancakeswap/uikit' import Preview from './Preview' import CombinationRules from './CombinationRules' import SynthesisDetail from './SynthesisDetail' diff --git a/src/views/Compound/components/ShopList.tsx b/src/views/Compound/components/ShopList.tsx index 5608e50..7061794 100644 --- a/src/views/Compound/components/ShopList.tsx +++ b/src/views/Compound/components/ShopList.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react' -import styled, { keyframes } from 'styled-components' +import styled from 'styled-components' import { useTranslation } from 'contexts/Localization' -import { Flex, Image, useModal } from '@pancakeswap/uikit' +import { Flex, Image } from '@pancakeswap/uikit' const MainFlex = styled.div` & > .epicBcg { @@ -29,8 +29,6 @@ const MainFlex = styled.div` ` const ShopItem = styled(Flex)` - /* height: 358px; */ - /* border-radius: 20px; */ background: rgba(255, 255, 255, 0.39); box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.15); flex-direction: column;