import { MuiThemeProvider } from "@material-ui/core" ; import * as React from "react" ; import { render } from "react-dom" ; import { Provider as StateProvider } from "react-redux" ; import { BrowserRouter } from "react-router-dom" ; import { App } from "components/App" ; import { store , theme } from "providers" ; const config = document . querySelectorAll < HTMLMetaElement > ( "meta[name^=config]" ) ; window . env = Array . from ( config ) . reduce ( ( env , meta ) => { const key = meta . name . replace ( /^config\:/ , "" ) ; return { ... env , [ key . toUpperCase ( ) as keyof typeof window . env ] : meta . content } ; } , { } as any ) ; render ( < StateProvider store = { store } > < MuiThemeProvider theme = { theme } > < BrowserRouter > < App /> < /BrowserRouter> < /MuiThemeProvider> < /StateProvider>, document.getElementById("root"));