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