From 2e08cd67b9817d97cc4989708161bf4dd025d968 Mon Sep 17 00:00:00 2001 From: katspaugh <381895+katspaugh@users.noreply.github.com> Date: Thu, 17 Mar 2022 15:05:14 +0100 Subject: [PATCH] Epic: Dashboard --- src/routes/Home/index.tsx | 48 +++++++++++++++++++++++++++++++++++++++ src/routes/index.tsx | 16 ++++--------- src/routes/routes.ts | 1 + 3 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 src/routes/Home/index.tsx diff --git a/src/routes/Home/index.tsx b/src/routes/Home/index.tsx new file mode 100644 index 0000000000..90fbad815c --- /dev/null +++ b/src/routes/Home/index.tsx @@ -0,0 +1,48 @@ +import { ReactElement } from 'react' +import styled from 'styled-components' +import { Breadcrumb, BreadcrumbElement, Menu } from '@gnosis.pm/safe-react-components' + +import Page from 'src/components/layout/Page' +import Row from 'src/components/layout/Row' +import Col from 'src/components/layout/Col' + +const Card = styled.div` + background: #fff; + padding: 0 20px 30px; + border-radius: 8px; + flex: 1; + max-width: 500px; + margin: 10px; +` + +function Home(): ReactElement { + return ( + + + + + + + + + + + + + +

Owned Safes

+
+ + +

Transactions to Sign

+
+ + +

Gas Fees

+
+
+
+ ) +} + +export default Home diff --git a/src/routes/index.tsx b/src/routes/index.tsx index d47eae9d2e..13a232d2b0 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -6,22 +6,21 @@ import { Redirect, Route, Switch, useLocation } from 'react-router-dom' import { LoadingContainer } from 'src/components/LoaderContainer' import { lastViewedSafe } from 'src/logic/currentSession/store/selectors' import { - generateSafeRoute, LOAD_SPECIFIC_SAFE_ROUTE, OPEN_SAFE_ROUTE, ADDRESSED_ROUTE, - SAFE_ROUTES, WELCOME_ROUTE, ROOT_ROUTE, LOAD_SAFE_ROUTE, getNetworkRootRoutes, extractSafeAddress, + HOME_ROUTE, } from './routes' -import { getShortName } from 'src/config' import { setChainId } from 'src/logic/config/utils' import { setChainIdFromUrl } from 'src/utils/history' import { usePageTracking } from 'src/utils/googleTagManager' +const Home = React.lazy(() => import('./Home')) const Welcome = React.lazy(() => import('./welcome/Welcome')) const CreateSafePage = React.lazy(() => import('./CreateSafePage/CreateSafePage')) const LoadSafePage = React.lazy(() => import('./LoadSafePage/LoadSafePage')) @@ -82,20 +81,15 @@ const Routes = (): React.ReactElement => { } if (defaultSafe) { - return ( - - ) + return } return }} /> + + diff --git a/src/routes/routes.ts b/src/routes/routes.ts index b21c5353a6..b04a1d20da 100644 --- a/src/routes/routes.ts +++ b/src/routes/routes.ts @@ -41,6 +41,7 @@ export const LOAD_SPECIFIC_SAFE_ROUTE = `/load/:${SAFE_ADDRESS_SLUG}?` // ? = op // Routes independant of safe/network export const ROOT_ROUTE = '/' +export const HOME_ROUTE = '/home' export const WELCOME_ROUTE = '/welcome' export const OPEN_SAFE_ROUTE = '/open' export const LOAD_SAFE_ROUTE = generatePath(LOAD_SPECIFIC_SAFE_ROUTE) // By providing no slug, we get '/load'