Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/components/App.js
import React from 'react'; | import React from 'react'; | ||||
import 'antd/dist/antd.less'; | import 'antd/dist/antd.less'; | ||||
import '../index.css'; | import '../index.css'; | ||||
import styled, { ThemeProvider } from 'styled-components'; | import styled, { ThemeProvider, createGlobalStyle } from 'styled-components'; | ||||
import { theme } from '@assets/styles/theme'; | import { theme } from '@assets/styles/theme'; | ||||
import { | import { | ||||
FolderOpenFilled, | FolderOpenFilled, | ||||
CaretRightOutlined, | CaretRightOutlined, | ||||
SettingFilled, | SettingFilled, | ||||
} from '@ant-design/icons'; | } from '@ant-design/icons'; | ||||
import Wallet from '@components/Wallet/Wallet'; | import Wallet from '@components/Wallet/Wallet'; | ||||
import Send from '@components/Send/Send'; | import Send from '@components/Send/Send'; | ||||
Show All 12 Lines | import { | ||||
Redirect, | Redirect, | ||||
Switch, | Switch, | ||||
useLocation, | useLocation, | ||||
useHistory, | useHistory, | ||||
} from 'react-router-dom'; | } from 'react-router-dom'; | ||||
import fbt from 'fbt'; | import fbt from 'fbt'; | ||||
const GlobalStyle = createGlobalStyle` | |||||
.ant-modal-wrap > div > div.ant-modal-content > div > div > div.ant-modal-confirm-btns > button, .ant-modal > button, .ant-modal-confirm-btns > button, .ant-modal-footer > button { | |||||
border-radius: 8px; | |||||
background-color: #fff; | |||||
color: rgb(62, 63, 66); | |||||
font-weight: bold; | |||||
} | |||||
.ant-modal-wrap > div > div.ant-modal-content > div > div > div.ant-modal-confirm-btns > button:hover,.ant-modal-confirm-btns > button:hover, .ant-modal-footer > button:hover { | |||||
color: #f59332; | |||||
transition: color 0.3s; | |||||
background-color: white; | |||||
} | |||||
.selectedCurrencyOption:hover { | |||||
color: #fff !important; | |||||
background-color: #ff8d00 !important; | |||||
} | |||||
`; | |||||
const CustomApp = styled.div` | const CustomApp = styled.div` | ||||
text-align: center; | text-align: center; | ||||
font-family: 'Gilroy', sans-serif; | font-family: 'Gilroy', sans-serif; | ||||
background-color: #fbfbfd; | background-color: #fbfbfd; | ||||
`; | `; | ||||
const Footer = styled.div` | const Footer = styled.div` | ||||
background-color: #fff; | background-color: #fff; | ||||
border-radius: 20px; | border-radius: 20px; | ||||
▲ Show 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | const App = () => { | ||||
); | ); | ||||
const location = useLocation(); | const location = useLocation(); | ||||
const history = useHistory(); | const history = useHistory(); | ||||
const selectedKey = | const selectedKey = | ||||
location && location.pathname ? location.pathname.substr(1) : ''; | location && location.pathname ? location.pathname.substr(1) : ''; | ||||
return ( | return ( | ||||
<ThemeProvider theme={theme}> | <ThemeProvider theme={theme}> | ||||
<GlobalStyle /> | |||||
<CustomApp> | <CustomApp> | ||||
<WalletBody> | <WalletBody> | ||||
<WalletCtn> | <WalletCtn> | ||||
<HeaderCtn> | <HeaderCtn> | ||||
<CashTabLogo src={CashTab} alt="cashtab" /> | <CashTabLogo src={CashTab} alt="cashtab" /> | ||||
{hasTab && ( | {hasTab && ( | ||||
<EasterEgg src={TabCash} alt="tabcash" /> | <EasterEgg src={TabCash} alt="tabcash" /> | ||||
)} | )} | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |