diff --git a/src/components/NoticeComponent.tsx b/src/components/NoticeComponent.tsx index 7e8bbf61..97b1040d 100644 --- a/src/components/NoticeComponent.tsx +++ b/src/components/NoticeComponent.tsx @@ -32,7 +32,10 @@ class NoticeComponent extends React.Component { constructor(props: NoticeProps) { super(props); - let maxCountdownTime = props.maxCountdownTime || (() => 4); + let maxCountdownTime = () => { + if (this.props.maxCountdownTime) return this.props.maxCountdownTime(); + else return 4; + }; //the id for the setInterval running the countdown this.countdownInterval = null; diff --git a/src/components/SkipNoticeComponent.tsx b/src/components/SkipNoticeComponent.tsx index 3cf3831f..07572de6 100644 --- a/src/components/SkipNoticeComponent.tsx +++ b/src/components/SkipNoticeComponent.tsx @@ -2,9 +2,13 @@ import * as React from "react"; import Config from "../config" import { ContentContainer } from "../types"; +import Utils from "../utils"; +var utils = new Utils(); + import NoticeComponent from "./NoticeComponent"; import NoticeTextSelectionComponent from "./NoticeTextSectionComponent"; + export interface SkipNoticeProps { UUID: string; autoSkip: boolean; @@ -79,6 +83,10 @@ class SkipNoticeComponent extends React.Component - {/* Never show button if manualSkip is disabled */} + {/* Never show button if autoSkip is enabled */} {!this.autoSkip ? "" :