aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/components/options
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/options')
-rw-r--r--src/components/options/CategorySkipOptionsComponent.tsx1
-rw-r--r--src/components/options/KeybindComponent.tsx8
-rw-r--r--src/components/options/UnsubmittedVideoListItem.tsx1
-rw-r--r--src/components/options/UnsubmittedVideosComponent.tsx2
4 files changed, 8 insertions, 4 deletions
diff --git a/src/components/options/CategorySkipOptionsComponent.tsx b/src/components/options/CategorySkipOptionsComponent.tsx
index a7aa55d9..486a43ed 100644
--- a/src/components/options/CategorySkipOptionsComponent.tsx
+++ b/src/components/options/CategorySkipOptionsComponent.tsx
@@ -13,6 +13,7 @@ export interface CategorySkipOptionsProps {
category: Category;
defaultColor?: string;
defaultPreviewColor?: string;
+ children?: React.ReactNode;
}
export interface CategorySkipOptionsState {
diff --git a/src/components/options/KeybindComponent.tsx b/src/components/options/KeybindComponent.tsx
index 34345301..4d49c7f4 100644
--- a/src/components/options/KeybindComponent.tsx
+++ b/src/components/options/KeybindComponent.tsx
@@ -1,5 +1,5 @@
import * as React from "react";
-import * as ReactDOM from "react-dom";
+import { createRoot, Root } from 'react-dom/client';
import Config from "../../config";
import { Keybind } from "../../types";
import KeybindDialogComponent from "./KeybindDialogComponent";
@@ -14,6 +14,7 @@ export interface KeybindState {
}
let dialog;
+let root: Root;
class KeybindComponent extends React.Component<KeybindProps, KeybindState> {
constructor(props: KeybindProps) {
@@ -56,11 +57,12 @@ class KeybindComponent extends React.Component<KeybindProps, KeybindState> {
dialog = parent.document.createElement("div");
dialog.id = "keybind-dialog";
parent.document.body.prepend(dialog);
- ReactDOM.render(<KeybindDialogComponent option={this.props.option} closeListener={(updateWith) => this.closeEditDialog(updateWith)} />, dialog);
+ root = createRoot(dialog);
+ root.render(<KeybindDialogComponent option={this.props.option} closeListener={(updateWith) => this.closeEditDialog(updateWith)} />);
}
closeEditDialog(updateWith: Keybind): void {
- ReactDOM.unmountComponentAtNode(dialog);
+ root.unmount();
dialog.remove();
if (updateWith != null)
this.setState({keybind: updateWith});
diff --git a/src/components/options/UnsubmittedVideoListItem.tsx b/src/components/options/UnsubmittedVideoListItem.tsx
index d670461d..b2150457 100644
--- a/src/components/options/UnsubmittedVideoListItem.tsx
+++ b/src/components/options/UnsubmittedVideoListItem.tsx
@@ -5,6 +5,7 @@ import { exportTimes, exportTimesAsHashParam } from "../../utils/exporter";
export interface UnsubmittedVideosListItemProps {
videoID: string;
+ children?: React.ReactNode;
}
export interface UnsubmittedVideosListItemState {
diff --git a/src/components/options/UnsubmittedVideosComponent.tsx b/src/components/options/UnsubmittedVideosComponent.tsx
index 892c49be..3806b881 100644
--- a/src/components/options/UnsubmittedVideosComponent.tsx
+++ b/src/components/options/UnsubmittedVideosComponent.tsx
@@ -7,7 +7,7 @@ export interface UnsubmittedVideosProps {
}
export interface UnsubmittedVideosState {
- tableVisible: boolean,
+ tableVisible: boolean;
}
class UnsubmittedVideosComponent extends React.Component<UnsubmittedVideosProps, UnsubmittedVideosState> {