|
1 | 1 | import React from 'react'; |
2 | | -import { HashRouter, Route, Switch, Redirect } from 'react-router-dom'; |
| 2 | +import { HashRouter, Route, Switch } from 'react-router-dom'; |
3 | 3 | import './App.css'; |
4 | | -import Web3ReactManager from 'components/Web3ReactManager'; |
5 | | -import FooterContainer from './containers/FooterContainer'; |
6 | | -import LandingPageFooter from './components/LandingPage/Footer'; |
7 | | -import LandingPageHeader from './components/LandingPage/Header'; |
8 | | -import PortfolioContainer from './containers/PortfolioContainer'; |
9 | | -import styled from 'styled-components'; |
10 | | - |
11 | | -import FAQPage from 'components/FAQPage'; |
12 | | -import MenuBar from 'components/MenuBar'; |
13 | | -import WalletInfoContainer from 'containers/WalletInfoContainer'; |
14 | | -import MixAssetsContainer from 'containers/MixAssetsContainer'; |
15 | | -import EarnInterestContainer from 'containers/EarnInterestContainer'; |
16 | | -import WithdrawContainer from 'containers/WithdrawContainer'; |
17 | | - |
18 | | -const ContentWrapper = styled.div` |
19 | | - display: flex; |
20 | | - flex-direction: row; |
21 | | - justify-content: space-between; |
22 | | -`; |
23 | | - |
24 | | -const ContentContainer = ({ children }) => { |
25 | | - return ( |
26 | | - <div className="exchange-body-container"> |
27 | | - <div className="app-shell"> |
28 | | - <Web3ReactManager> |
29 | | - <ContentWrapper> |
30 | | - <MenuBar /> |
31 | | - {children} |
32 | | - <WalletInfoContainer /> |
33 | | - </ContentWrapper> |
34 | | - <FooterContainer /> |
35 | | - </Web3ReactManager> |
36 | | - </div> |
37 | | - </div> |
38 | | - ); |
39 | | -}; |
40 | 4 |
|
41 | 5 | const App = () => { |
42 | 6 | return ( |
43 | 7 | <HashRouter> |
44 | 8 | <Switch> |
45 | 9 | <Route exact path="/"> |
46 | | - <Redirect to="/portfolio" /> |
47 | | - </Route> |
48 | | - <Route path="/portfolio/"> |
49 | | - <ContentContainer> |
50 | | - <PortfolioContainer /> |
51 | | - </ContentContainer> |
52 | | - </Route> |
53 | | - <Route path="/mix-assets/"> |
54 | | - <ContentContainer> |
55 | | - <MixAssetsContainer /> |
56 | | - </ContentContainer> |
57 | | - </Route> |
58 | | - <Route path="/earn-interest"> |
59 | | - <ContentContainer> |
60 | | - <EarnInterestContainer /> |
61 | | - </ContentContainer> |
62 | | - </Route> |
63 | | - <Route path="/withdraw"> |
64 | | - <ContentContainer> |
65 | | - <WithdrawContainer /> |
66 | | - </ContentContainer> |
67 | | - </Route> |
68 | | - <Route exact path="/faq"> |
69 | | - <div className="landing-body-container"> |
70 | | - <div className="app-shell"> |
71 | | - <LandingPageHeader /> |
72 | | - <FAQPage /> |
73 | | - <LandingPageFooter /> |
74 | | - </div> |
75 | | - </div> |
76 | 10 | </Route> |
77 | 11 | </Switch> |
78 | 12 | </HashRouter> |
|
0 commit comments