aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render/UnsubmittedVideos.tsx
blob: 3b3b3855a25f9bd40b20fe3adfbe5ce4af58c052 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import * as React from "react";
import { createRoot } from 'react-dom/client';
import UnsubmittedVideosComponent from "../components/options/UnsubmittedVideosComponent";

class UnsubmittedVideos {

    ref: React.RefObject<UnsubmittedVideosComponent>;

    constructor(element: Element) {
        this.ref = React.createRef();

        const root = createRoot(element);
        root.render(
            <UnsubmittedVideosComponent ref={this.ref} />
        );
    }

    update(): void {
        this.ref.current?.forceUpdate();
    }

}

export default UnsubmittedVideos;