aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/options.ts
diff options
context:
space:
mode:
authorMichael C <[email protected]>2022-10-07 19:28:29 -0400
committerMichael C <[email protected]>2022-10-07 19:28:29 -0400
commit55c84662c02cd4c5fb0795128dd4966192228fc5 (patch)
tree23565231c90daa40200711234399141c007e194f /src/options.ts
parent7ec09dd38562ee7d01acd47718b9a9d9f94cf902 (diff)
downloadSponsorBlock-55c84662c02cd4c5fb0795128dd4966192228fc5.tar.gz
SponsorBlock-55c84662c02cd4c5fb0795128dd4966192228fc5.zip
add some changes that are rendering properly
Diffstat (limited to 'src/options.ts')
-rw-r--r--src/options.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/options.ts b/src/options.ts
index c9596abb..888e7aaf 100644
--- a/src/options.ts
+++ b/src/options.ts
@@ -1,5 +1,5 @@
import * as React from "react";
-import * as ReactDOM from "react-dom";
+import { createRoot } from 'react-dom/client';
import Config from "./config";
import * as CompileConfig from "../config.json";
@@ -258,7 +258,8 @@ async function init() {
break;
}
case "keybind-change": {
- ReactDOM.render(React.createElement(KeybindComponent, {option: option}), optionsElements[i].querySelector("div"));
+ const root = createRoot(optionsElements[i].querySelector("div"));
+ root.render(React.createElement(KeybindComponent, {option: option}));
break;
}
case "display": {