-
Notifications
You must be signed in to change notification settings - Fork 355
/
index.tsx
40 lines (30 loc) · 1.1 KB
/
index.tsx
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, { FunctionComponent } from "react";
import ReactDOM from "react-dom";
import injectConditionalPolyfills from "coral-framework/helpers/injectConditionalPolyfills";
import potentiallyInjectAxe from "coral-framework/helpers/potentiallyInjectAxe";
import { createManaged } from "coral-framework/lib/bootstrap";
import { createReporter } from "coral-framework/lib/errors/reporter";
import App from "./App";
import { initLocalState } from "./local";
import localesData from "./locales";
// Import css variables.
import "coral-ui/theme/stream.css";
async function main() {
// Configure and load the error reporter.
const reporter = createReporter();
await injectConditionalPolyfills();
// Potentially inject react-axe for runtime a11y checks.
await potentiallyInjectAxe();
const ManagedCoralContextProvider = await createManaged({
initLocalState,
localesData,
reporter,
});
const Index: FunctionComponent = () => (
<ManagedCoralContextProvider>
<App />
</ManagedCoralContextProvider>
);
ReactDOM.render(<Index />, document.getElementById("app"));
}
void main();