forked from cypress-io/cypress-realworld-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.google.tsx
More file actions
40 lines (36 loc) · 854 Bytes
/
index.google.tsx
File metadata and controls
40 lines (36 loc) · 854 Bytes
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
import React from "react";
import { createRoot } from "react-dom/client";
import { Router } from "react-router-dom";
import {
createTheme,
ThemeProvider,
Theme,
StyledEngineProvider,
adaptV4Theme,
} from "@mui/material";
import AppGoogle from "./containers/AppGoogle";
import { history } from "./utils/historyUtils";
const theme = createTheme(
adaptV4Theme({
palette: {
secondary: {
main: "#fff",
},
},
})
);
const root = createRoot(document.getElementById("root")!);
if (process.env.VITE_GOOGLE) {
/* istanbul ignore next */
root.render(
<Router history={history}>
<StyledEngineProvider injectFirst>
<ThemeProvider theme={theme}>
<AppGoogle />
</ThemeProvider>
</StyledEngineProvider>
</Router>
);
} else {
console.error("Google is not configured.");
}