aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.tsx')
-rw-r--r--src/index.tsx15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/index.tsx b/src/index.tsx
index 4bce5a4..2565964 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,5 +1,7 @@
+/** @jsx jsx */
+import { jsx } from "@emotion/react";
import React from "react";
-import ReactDOM from "react-dom";
+import { createRoot } from "react-dom/client";
import App from "./App";
import * as serviceWorker from "./serviceWorker";
@@ -33,8 +35,10 @@ console.log(` SHA: %c ${process.env.COMMIT_REF} `, `padding: 2px; border-radiu
console.log("%cCome join us on Discord! https://discord.gg/python", `font-size: 1.5em; font-family: "Hind", "Arial"; color: ${colors.blurple}`);
-/* eslint-disable react/react-in-jsx-scope */
-ReactDOM.render(
+const rootDocument = document.getElementById("root");
+// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+const root = createRoot(rootDocument!);
+root.render(
<React.StrictMode>
<Sentry.ErrorBoundary
fallback={<p>An error has occurred with Python Discord Forms. Please let us know in the Discord server at <a href="https://discord.gg/python">discord.gg/python</a></p>}
@@ -47,10 +51,9 @@ ReactDOM.render(
console.log(err);
}}
>
- <App />
+ <App/>
</Sentry.ErrorBoundary>
- </React.StrictMode>,
- document.getElementById("root")
+ </React.StrictMode>
);
/* eslint-enable react/react-in-jsx-scope */