File tree Expand file tree Collapse file tree 4 files changed +51
-77
lines changed Expand file tree Collapse file tree 4 files changed +51
-77
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- import React from "react"
2
- import { makeStyles } from "@material-ui/core/styles"
3
-
4
- import { Footer } from "./Footer"
5
- import { Navbar } from "../Navbar"
6
-
7
- export const Page : React . FC < { children : React . ReactNode } > = ( { children } ) => {
8
- // TODO: More interesting styling here!
9
-
10
- const styles = useStyles ( )
11
-
12
- const header = (
13
- < div className = { styles . header } >
14
- < Navbar />
15
- </ div >
16
- )
17
-
18
- const footer = (
19
- < div className = { styles . footer } >
20
- < Footer />
21
- </ div >
22
- )
23
-
24
- const body = < div className = { styles . body } > { children } </ div >
25
-
26
- return (
27
- < div className = { styles . root } >
28
- { header }
29
- { body }
30
- { footer }
31
- </ div >
32
- )
33
- }
34
-
35
- const useStyles = makeStyles ( ( theme ) => ( {
36
- root : {
37
- display : "flex" ,
38
- flexDirection : "column" ,
39
- } ,
40
- header : {
41
- flex : 0 ,
42
- } ,
43
- body : {
44
- height : "100%" ,
45
- flex : 1 ,
46
- } ,
47
- footer : {
48
- flex : 0 ,
49
- } ,
50
- } ) )
1
+ export * from "./Footer"
Original file line number Diff line number Diff line change @@ -5,20 +5,62 @@ import ThemeProvider from "@material-ui/styles/ThemeProvider"
5
5
6
6
import { dark } from "../theme"
7
7
import { AppProps } from "next/app"
8
+ import { makeStyles } from "@material-ui/core"
9
+ import { Navbar } from "../components/Navbar"
10
+ import { Footer } from "../components/Page"
11
+
12
+ const Contents : React . FC < AppProps > = ( { Component, pageProps } ) => {
13
+ const styles = useStyles ( )
14
+
15
+ const header = (
16
+ < div className = { styles . header } >
17
+ < Navbar />
18
+ </ div >
19
+ )
20
+
21
+ const footer = (
22
+ < div className = { styles . footer } >
23
+ < Footer />
24
+ </ div >
25
+ )
26
+
27
+ return (
28
+ < div className = { styles . root } >
29
+ { header }
30
+ < Component { ...pageProps } />
31
+ { footer }
32
+ </ div >
33
+ )
34
+ }
8
35
9
36
/**
10
37
* <App /> is the root rendering logic of the application - setting up our router
11
38
* and any contexts / global state management.
12
- * @returns
13
39
*/
14
-
15
- const MyApp : React . FC < AppProps > = ( { Component, pageProps } ) => {
40
+ const MyApp : React . FC < AppProps > = ( appProps ) => {
16
41
return (
17
42
< ThemeProvider theme = { dark } >
18
43
< CssBaseline />
19
- < Component { ...pageProps } />
44
+ < Contents { ...appProps } />
20
45
</ ThemeProvider >
21
46
)
22
47
}
23
48
49
+ const useStyles = makeStyles ( ( theme ) => ( {
50
+ root : {
51
+ display : "flex" ,
52
+ flexDirection : "column" ,
53
+ } ,
54
+ header : {
55
+ flex : 0 ,
56
+ } ,
57
+ body : {
58
+ height : "100%" ,
59
+ flex : 1 ,
60
+ } ,
61
+ footer : {
62
+ flex : 0 ,
63
+ } ,
64
+ } ) )
65
+
24
66
export default MyApp
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import React from "react"
2
2
import { makeStyles , Box , Paper } from "@material-ui/core"
3
3
import { AddToQueue as AddWorkspaceIcon } from "@material-ui/icons"
4
4
5
- import { EmptyState , Page , SplitButton } from "../components"
5
+ import { EmptyState , SplitButton } from "../components"
6
6
7
7
const WorkspacesPage : React . FC = ( ) => {
8
8
const styles = useStyles ( )
@@ -17,7 +17,7 @@ const WorkspacesPage: React.FC = () => {
17
17
}
18
18
19
19
return (
20
- < Page >
20
+ < >
21
21
< div className = { styles . header } >
22
22
< SplitButton < string >
23
23
color = "primary"
@@ -37,12 +37,12 @@ const WorkspacesPage: React.FC = () => {
37
37
/>
38
38
</ div >
39
39
40
- < Paper style = { { maxWidth : "1380px" , margin : "1em auto" } } >
40
+ < Paper style = { { maxWidth : "1380px" , margin : "1em auto" , width : "100%" } } >
41
41
< Box pt = { 4 } pb = { 4 } >
42
42
< EmptyState message = "No workspaces available." button = { button } />
43
43
</ Box >
44
44
</ Paper >
45
- </ Page >
45
+ </ >
46
46
)
47
47
}
48
48
You can’t perform that action at this time.
0 commit comments