From a877cd941491f8db7bc9d982d402043779bf5345 Mon Sep 17 00:00:00 2001 From: Jordan Knott Date: Fri, 10 Apr 2020 11:31:29 -0500 Subject: [PATCH] feature: add dashboard redirect --- web/src/App/Routes.tsx | 2 ++ web/src/App/index.tsx | 17 +++++++++++++++- web/src/Dashboard/index.tsx | 8 ++++++++ web/src/Projects/Project/index.tsx | 31 +++++++++++++++++++++--------- web/src/Projects/index.tsx | 9 ++++++++- 5 files changed, 56 insertions(+), 11 deletions(-) create mode 100644 web/src/Dashboard/index.tsx diff --git a/web/src/App/Routes.tsx b/web/src/App/Routes.tsx index 8558b66..61482ab 100644 --- a/web/src/App/Routes.tsx +++ b/web/src/App/Routes.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { Router, Switch, Route } from 'react-router-dom'; import * as H from 'history'; +import Dashboard from 'Dashboard'; import Projects from 'Projects'; import Project from 'Projects/Project'; import Login from 'Auth'; @@ -13,6 +14,7 @@ type RoutesProps = { const Routes = ({ history }: RoutesProps) => ( + diff --git a/web/src/App/index.tsx b/web/src/App/index.tsx index 8ee41ee..aab9e76 100644 --- a/web/src/App/index.tsx +++ b/web/src/App/index.tsx @@ -4,9 +4,17 @@ import { setAccessToken } from 'shared/utils/accessToken'; import NormalizeStyles from './NormalizeStyles'; import BaseStyles from './BaseStyles'; import Routes from './Routes'; +import Navbar from 'shared/components/Navbar'; +import GlobalTopNavbar from 'App/TopNavbar'; +import styled from 'styled-components'; const history = createBrowserHistory(); +const MainContent = styled.div` + padding: 0 0 50px 80px; + background: #262c49; +`; + const App = () => { const [loading, setLoading] = useState(true); @@ -29,7 +37,14 @@ const App = () => { }, []); if (loading) { - return
loading...
; + return ( + <> + + + + + + ); } return ( <> diff --git a/web/src/Dashboard/index.tsx b/web/src/Dashboard/index.tsx new file mode 100644 index 0000000..8e8b245 --- /dev/null +++ b/web/src/Dashboard/index.tsx @@ -0,0 +1,8 @@ +import React from 'react'; +import { Redirect } from 'react-router'; + +const Dashboard: React.FC = () => { + return ; +}; + +export default Dashboard; diff --git a/web/src/Projects/Project/index.tsx b/web/src/Projects/Project/index.tsx index f0a34b8..f3c256e 100644 --- a/web/src/Projects/Project/index.tsx +++ b/web/src/Projects/Project/index.tsx @@ -37,7 +37,7 @@ interface QuickCardEditorState { } const MainContent = styled.div` - padding: 0 0 50px 100px; + padding: 0 0 50px 80px; height: 100%; background: #262c49; `; @@ -47,12 +47,21 @@ const Wrapper = styled.div` background-color: red; `; +const TitleWrapper = styled.div` + margin-left: 38px; + margin-bottom: 15px; +`; + const Title = styled.span` text-align: center; font-size: 24px; color: #fff; `; +const Board = styled.div` + margin-left: 36px; +`; + interface ProjectParams { projectId: string; } @@ -187,14 +196,18 @@ const Project = () => { - {data.findProject.name} - + + {data.findProject.name} + + + + {quickCardEditor.isOpen && ( { const { loading, data } = useGetProjectsQuery(); console.log(loading, data); if (loading) { - return Loading; + return ( + <> + + + + + + ); } if (data) { const { teams } = data.organizations[0];