File tree Expand file tree Collapse file tree 2 files changed +31
-4
lines changed Expand file tree Collapse file tree 2 files changed +31
-4
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,12 @@ export default function VideoArea({
80
80
</ span >
81
81
</ VideosContainer >
82
82
83
- < Button variant = "outlined" onClick = { handleWebcamBtnClick } > Start webcam</ Button >
83
+ < Button
84
+ color = "primary"
85
+ variant = "outlined"
86
+ onClick = { handleWebcamBtnClick } >
87
+ Start webcam
88
+ </ Button >
84
89
85
90
86
91
< Dialog open = { isWebcamDialogOpen } >
Original file line number Diff line number Diff line change 1
1
import { createGlobalStyle , ThemeProvider } from 'styled-components' ;
2
+ import { createMuiTheme , MuiThemeProvider } from '@material-ui/core' ;
3
+ import { unstable_createMuiStrictModeTheme } from '@material-ui/core' ;
4
+
5
+
2
6
3
7
const GlobalStyle = createGlobalStyle `
4
8
html,
@@ -23,19 +27,37 @@ const GlobalStyle = createGlobalStyle`
23
27
}
24
28
` ;
25
29
26
- const theme = {
30
+ const styledComponentsTheme = {
27
31
colors : {
28
32
primary : '#0070f3'
29
33
}
30
34
} ;
31
35
36
+ console . log ( "In _app.js, process.env.NODE_ENV: " ) ;
37
+ console . log ( process . env . NODE_ENV ) ;
38
+
39
+ const createMuiThemeForEnvironment =
40
+ process . env . NODE_ENV === 'production' ?
41
+ createMuiTheme :
42
+ // For dev environments, we need to use a newer version that solves the strict mode console warning for components like the Dialog. See: https://github.com/mui-org/material-ui/issues/13394#issuecomment-815452717
43
+ unstable_createMuiStrictModeTheme ;
44
+
45
+ const muiTheme = createMuiThemeForEnvironment ( {
46
+ palette : {
47
+ primary : {
48
+ main : styledComponentsTheme . colors . primary
49
+ }
50
+ }
51
+ } ) ;
32
52
33
53
function MyApp ( { Component, pageProps } ) {
34
54
return (
35
55
< >
36
56
< GlobalStyle />
37
- < ThemeProvider theme = { theme } >
38
- < Component { ...pageProps } />
57
+ < ThemeProvider theme = { styledComponentsTheme } >
58
+ < MuiThemeProvider theme = { muiTheme } >
59
+ < Component { ...pageProps } />
60
+ </ MuiThemeProvider >
39
61
</ ThemeProvider >
40
62
</ >
41
63
) ;
You can’t perform that action at this time.
0 commit comments