@@ -6,15 +6,10 @@ import {
66 Switch ,
77} from 'react-router-dom' ;
88import { Provider } from 'react-redux' ;
9- import styled , {
10- ThemeProvider ,
11- createGlobalStyle ,
12- DefaultTheme ,
13- } from 'styled-components' ;
149
1510import configureStore from './store/configureStore' ;
1611import Loading from './components/loading' ;
17- import Sidebar , { SIDEBAR_WIDTH } from './components/sidebar' ;
12+ import Sidebar from './components/sidebar' ;
1813
1914import EnterpriseLoginRoute from './routes/enterprise-login' ;
2015import LoginRoute from './routes/login' ;
@@ -46,100 +41,22 @@ export const PrivateRoute = ({ component: Component, ...rest }) => {
4641 ) ;
4742} ;
4843
49- const theme : DefaultTheme = {
50- borderRadius : '3px' ,
51-
52- primary : '#203354' ,
53- success : '#2CC966' ,
54- info : '#8BA9C6' ,
55- warning : '#FCAA67' ,
56- danger : '#B7524F' ,
57-
58- grayLighter : '#f9fafa' ,
59- grayLight : '#eceeef' ,
60- grayDarker : '#3d3f41' ,
61- grayDark : '#55595C' ,
62-
63- primaryDark : '#071A3B' ,
64- } ;
65-
66- const GlobalStyle = createGlobalStyle `
67- html,
68- body {
69- height: 100%;
70- -webkit-user-select: none;
71- }
72-
73- body {
74- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto',
75- 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
76- sans-serif;
77- margin: 0;
78- cursor: default;
79- }
80-
81- #gitify {
82- height: 100%;
83- }
84-
85- button {
86- &:hover {
87- cursor: pointer;
88- }
89- }
90-
91- #nprogress {
92- pointer-events: none;
93-
94- .bar {
95- position: fixed;
96- top: 0;
97- left: ${ SIDEBAR_WIDTH } ;
98- z-index: 1031;
99- background: ${ ( props ) => props . theme . primary } ;
100-
101- width: 100%;
102- height: 2px;
103- }
104- }
105-
106- .notification-exit {
107- transform: translate3d(0px, 0, 0);
108- opacity: 1;
109- transition-duration: 250ms;
110- transition-timing-function: cubic-bezier(0.175, 0.665, 0.32, 1), linear;
111-
112- &.notification-exit-active {
113- transform: translate3d(350px, 0, 0);
114- opacity: 0;
115- }
116- }
117- ` ;
118-
119- const Wrapper = styled . div `
120- height: 100%;
121- padding-left: ${ SIDEBAR_WIDTH } ;
122- ` ;
123-
12444export const App = ( ) => {
12545 return (
12646 < Provider store = { store } >
127- < ThemeProvider theme = { theme } >
128- < Router >
129- < GlobalStyle />
130- < Wrapper >
131- < Loading />
132- < Sidebar />
133-
134- < Switch >
135- < PrivateRoute path = "/" exact component = { NotificationsRoute } />
136- < PrivateRoute path = "/settings" exact component = { SettingsRoute } />
137- < Route path = "/login" component = { LoginRoute } />
138- < Route path = "/enterpriselogin" component = { EnterpriseLoginRoute } />
139- </ Switch >
140- </ Wrapper >
141- </ Router >
142- </ ThemeProvider >
47+ < Router >
48+ < div className = "flex flex-col pl-14 h-full" >
49+ < Loading />
50+ < Sidebar />
51+
52+ < Switch >
53+ < PrivateRoute path = "/" exact component = { NotificationsRoute } />
54+ < PrivateRoute path = "/settings" exact component = { SettingsRoute } />
55+ < Route path = "/login" component = { LoginRoute } />
56+ < Route path = "/enterpriselogin" component = { EnterpriseLoginRoute } />
57+ </ Switch >
58+ </ div >
59+ </ Router >
14360 </ Provider >
14461 ) ;
14562} ;
0 commit comments