mirror of
https://github.com/wassname/talk.git
synced 2026-08-05 13:30:26 +08:00
* feature: use react-axe and fix some a11y issues in stream * fix: adapt snapshots * chore: fix axe warnings in auth and account bundle * chore: improve accessibility in install bundle * chore: add some comments
34 lines
866 B
TypeScript
34 lines
866 B
TypeScript
import React, { FunctionComponent } from "react";
|
|
import ReactDOM from "react-dom";
|
|
|
|
import potentiallyInjectAxe from "coral-framework/helpers/potentiallyInjectAxe";
|
|
import { createManaged } from "coral-framework/lib/bootstrap";
|
|
|
|
import App from "./App";
|
|
import Head from "./Head";
|
|
import { initLocalState } from "./local";
|
|
import localesData from "./locales";
|
|
|
|
// Import css variables.
|
|
import "coral-ui/theme/variables.css";
|
|
|
|
async function main() {
|
|
// Potentially inject react-axe for runtime a11y checks.
|
|
await potentiallyInjectAxe();
|
|
const ManagedCoralContextProvider = await createManaged({
|
|
initLocalState,
|
|
localesData,
|
|
});
|
|
|
|
const Index: FunctionComponent = () => (
|
|
<ManagedCoralContextProvider>
|
|
<Head />
|
|
<App />
|
|
</ManagedCoralContextProvider>
|
|
);
|
|
|
|
ReactDOM.render(<Index />, document.getElementById("app"));
|
|
}
|
|
|
|
main();
|