aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.tsx
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-06-23 15:05:31 +0400
committerGravatar GitHub <[email protected]>2022-06-23 15:05:31 +0400
commit7aa707daa1b4cfe9f2dedcc4e27d3b3a8600e79c (patch)
treebcae8de0d1d1f0488323b4e7d4cf2e1d19db7a5a /src/index.tsx
parentMerge pull request #453 from DavinderJolly/snekbox-results-feedback (diff)
parentBump Webpack Dev Server To 4.9.2 (diff)
Merge pull request #454 from python-discord/bump-dependencies
Bump Dependencies
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 */