@@ -3,7 +3,6 @@ import {HashRouter as Router, Route, Switch} from "react-router-dom";
3
3
import React from "react" ;
4
4
import ReactModal from "react-modal" ;
5
5
import { GridConfig } from "./config" ;
6
- import NodeType from "./models/node" ;
7
6
import TopBar from "./components/TopBar/TopBar" ;
8
7
import Overview from "./screens/Overview/Overview" ;
9
8
import { Box , Link , makeStyles } from "@material-ui/core" ;
@@ -13,77 +12,67 @@ import Sessions from "./screens/Sessions/Sessions";
13
12
import Help from "./screens/Help/Help" ;
14
13
15
14
export const client = new ApolloClient ( {
16
- cache : new InMemoryCache ( ) ,
17
- uri : GridConfig . serverUri ,
15
+ cache : new InMemoryCache ( ) ,
16
+ uri : GridConfig . serverUri ,
18
17
} ) ;
19
18
20
- declare global {
21
- interface Window {
22
- rerunSearch : VoidFunction ;
23
- pbar : any ;
24
- pauseUpdates : boolean ;
25
- updatesRunning : boolean ;
26
- activeNode : NodeType ;
27
- }
28
- }
29
-
30
19
function Copyright ( ) {
31
- return (
32
- < Typography variant = "body2" color = "textSecondary" align = "center" >
33
- { 'All rights reserved - ' }
34
- < Link href = "https://sfconservancy.org/" target = { "_blank" } >
35
- Software Freedom Conservancy
36
- </ Link > { ' ' }
37
- { new Date ( ) . getFullYear ( ) }
38
- { '.' }
39
- </ Typography >
40
- ) ;
20
+ return (
21
+ < Typography variant = "body2" color = "textSecondary" align = "center" >
22
+ { 'All rights reserved - ' }
23
+ < Link href = "https://sfconservancy.org/" target = { "_blank" } >
24
+ Software Freedom Conservancy
25
+ </ Link > { ' ' }
26
+ { new Date ( ) . getFullYear ( ) }
27
+ { '.' }
28
+ </ Typography >
29
+ ) ;
41
30
}
42
31
43
32
44
33
const useStyles = makeStyles ( ( theme ) => ( {
45
- root : {
46
- display : "flex" ,
47
- } ,
48
- content : {
49
- flexGrow : 1 ,
50
- height : '100vh' ,
51
- overflow : 'auto' ,
52
- paddingTop : theme . spacing ( 8 ) ,
53
- } ,
54
- container : {
55
- paddingTop : theme . spacing ( 4 ) ,
56
- paddingBottom : theme . spacing ( 4 ) ,
57
- } ,
34
+ root : {
35
+ display : "flex" ,
36
+ } ,
37
+ content : {
38
+ flexGrow : 1 ,
39
+ height : '100vh' ,
40
+ overflow : 'auto' ,
41
+ paddingTop : theme . spacing ( 8 ) ,
42
+ } ,
43
+ container : {
44
+ paddingTop : theme . spacing ( 4 ) ,
45
+ paddingBottom : theme . spacing ( 4 ) ,
46
+ } ,
58
47
} ) ) ;
59
48
60
49
61
50
if ( process . env . NODE_ENV !== 'test' ) ReactModal . setAppElement ( "#root" ) ;
62
51
63
52
function App ( ) {
64
- const classes = useStyles ( ) ;
65
- return (
66
- < ApolloProvider client = { client } >
67
- < Router >
68
- < div className = { classes . root } >
69
- < TopBar />
70
- < main className = { classes . content } >
71
- < Container maxWidth = { false } className = { classes . container } >
72
- < Switch >
73
- < Route exact path = { "/sessions" } component = { Sessions } />
74
- < Route exact path = { "/help" } component = { Help } />
75
- < Route exact path = { "/" } component = { Overview } />
76
- < Route component = { Help } />
77
- </ Switch >
78
- </ Container >
79
- < Box pt = { 4 } >
80
- < Copyright />
81
- </ Box >
82
- </ main >
83
- </ div >
84
- </ Router >
85
- </ ApolloProvider >
86
- ) ;
53
+ const classes = useStyles ( ) ;
54
+ return (
55
+ < ApolloProvider client = { client } >
56
+ < Router >
57
+ < div className = { classes . root } >
58
+ < TopBar />
59
+ < main className = { classes . content } >
60
+ < Container maxWidth = { false } className = { classes . container } >
61
+ < Switch >
62
+ < Route exact path = { "/sessions" } component = { Sessions } />
63
+ < Route exact path = { "/help" } component = { Help } />
64
+ < Route exact path = { "/" } component = { Overview } />
65
+ < Route component = { Help } />
66
+ </ Switch >
67
+ </ Container >
68
+ < Box pt = { 4 } >
69
+ < Copyright />
70
+ </ Box >
71
+ </ main >
72
+ </ div >
73
+ </ Router >
74
+ </ ApolloProvider >
75
+ ) ;
87
76
}
88
77
89
78
export default App ;
0 commit comments