mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-11 22:17:21 +03:00
Auto update hidden categories when redeemed
This commit is contained in:
@@ -4,12 +4,20 @@ import CategoryChooserComponent from "../components/options/CategoryChooserCompo
|
||||
|
||||
class CategoryChooser {
|
||||
|
||||
ref: React.RefObject<CategoryChooserComponent>;
|
||||
|
||||
constructor(element: Element) {
|
||||
this.ref = React.createRef();
|
||||
|
||||
ReactDOM.render(
|
||||
<CategoryChooserComponent/>,
|
||||
<CategoryChooserComponent ref={this.ref} />,
|
||||
element
|
||||
);
|
||||
}
|
||||
|
||||
update(): void {
|
||||
this.ref.current?.forceUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
export default CategoryChooser;
|
||||
@@ -4,12 +4,21 @@ import UnsubmittedVideosComponent from "../components/options/UnsubmittedVideosC
|
||||
|
||||
class UnsubmittedVideos {
|
||||
|
||||
ref: React.RefObject<UnsubmittedVideosComponent>;
|
||||
|
||||
constructor(element: Element) {
|
||||
this.ref = React.createRef();
|
||||
|
||||
ReactDOM.render(
|
||||
<UnsubmittedVideosComponent/>,
|
||||
<UnsubmittedVideosComponent ref={this.ref} />,
|
||||
element
|
||||
);
|
||||
}
|
||||
|
||||
update(): void {
|
||||
this.ref.current?.forceUpdate();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default UnsubmittedVideos;
|
||||
|
||||
Reference in New Issue
Block a user