diff options
Diffstat (limited to 'src/components/SponsorTimeEditComponent.tsx')
-rw-r--r-- | src/components/SponsorTimeEditComponent.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index 5664f7a9..673cba3c 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -191,14 +191,14 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo </div> {/* Action Type */} - {getCategoryActionType(sponsorTime.category) === CategoryActionType.Skippable ? ( + {CompileConfig.categorySupport[sponsorTime.category]?.length > 1 ? ( <div style={{position: "relative"}}> <select id={"sponsorTimeActionTypes" + this.idSuffix} className="sponsorTimeEditSelector sponsorTimeActionTypes" defaultValue={sponsorTime.actionType} ref={this.actionTypeOptionRef} onChange={() => this.saveEditTimes()}> - {this.getActionTypeOptions()} + {this.getActionTypeOptions(sponsorTime)} </select> </div> ): ""} @@ -284,10 +284,10 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo this.saveEditTimes(); } - getActionTypeOptions(): React.ReactElement[] { + getActionTypeOptions(sponsorTime: SponsorTime): React.ReactElement[] { const elements = []; - for (const actionType of ActionTypes) { + for (const actionType of CompileConfig.categorySupport[sponsorTime.category]) { elements.push( <option value={actionType} key={actionType}> |