| 1 | import React from "react"; |
| 2 | import { createRoot } from "react-dom/client"; |
| 3 | import { flushSync } from "react-dom"; |
| 4 | import { LocaleProvider } from "../src/lib/i18n"; |
| 5 | import { SessionLoadingFixture, type LoadingFixtureInput } from "../src/test-support/sessionLoadingFixture"; |
| 6 | import "../src/styles.css"; |
| 7 | import "../src/components/ChatTranscript.css"; |
| 8 | |
| 9 | const root = createRoot(document.getElementById("root")!); |
| 10 | const paintLoading = (input: LoadingFixtureInput) => flushSync(() => root.render( |
| 11 | <LocaleProvider><div className="app" style={{ height: "100vh", display: "flex", flexDirection: "column" }}> |
| 12 | <SessionLoadingFixture {...input} /> |
| 13 | </div></LocaleProvider>, |
| 14 | )); |
| 15 | Object.assign(window, { paintLoading }); |
| 16 |