-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.js
More file actions
66 lines (58 loc) · 1.31 KB
/
Copy pathindex.js
File metadata and controls
66 lines (58 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import React from "react";
import { createRoot } from "react-dom";
import { MuiThemeProvider, createMuiTheme } from "@material-ui/core/styles";
import "./index.css";
import RootContainer from "./containers/RootContainer";
import { unregister } from "./registerServiceWorker";
import { initFakeApi } from "./libs/fake-api";
const theme = createMuiTheme({
palette: {
primary: {
main: "#900000",
light: "#c8412a"
},
secondary: { main: "#DDDDDD" },
error: {
main: "#f44336",
light: "#e5c9ca"
}
},
typography: {
useNextVariants: true
},
overrides: {
MuiListSubheader: {
root: {
fontSize: "1rem",
color: "grey",
fontWeight: 500
}
},
MuiTypography: {
subheading: {
fontSize: "1rem",
color: "grey",
fontWeight: 500
}
}
}
});
/**
* This is where you add the root providers (like react-redux Provider)
*/
const render = Component => {
createRoot(document.getElementById("root")).render(
<MuiThemeProvider theme={theme}>
<Component />
</MuiThemeProvider>
);
};
// You may init any API service here
initFakeApi();
render(RootContainer);
unregister();
// if (module.hot) {
// module.hot.accept("./containers/RootContainer", () => {
// render(RootContainer);
// });
// }