mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-08 04:27:15 +03:00
Submission notice now updates when sponsors are added
This commit is contained in:
@@ -9,7 +9,11 @@ class SubmissionNotice {
|
||||
|
||||
callback: () => any;
|
||||
|
||||
noticeRef: React.MutableRefObject<SubmissionNoticeComponent>;
|
||||
|
||||
constructor(contentContainer: () => any, callback: () => any) {
|
||||
this.noticeRef = React.createRef();
|
||||
|
||||
this.contentContainer = contentContainer;
|
||||
this.callback = callback;
|
||||
|
||||
@@ -38,10 +42,15 @@ class SubmissionNotice {
|
||||
ReactDOM.render(
|
||||
<SubmissionNoticeComponent
|
||||
contentContainer={contentContainer}
|
||||
callback={callback} />,
|
||||
callback={callback}
|
||||
ref={this.noticeRef} />,
|
||||
noticeElement
|
||||
);
|
||||
}
|
||||
|
||||
update() {
|
||||
this.noticeRef.current.forceUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
export default SubmissionNotice;
|
||||
Reference in New Issue
Block a user