Make wiki link go to specific page and fix crash when submitting

This commit is contained in:
Ajay
2022-01-13 23:56:15 -05:00
parent 6d4ec823a0
commit e2ba5c2063

View File

@@ -189,7 +189,8 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
</select> </select>
{/* open in new tab */} {/* open in new tab */}
<a href="https://wiki.sponsor.ajay.app/index.php/Segment_Categories" <a href={CompileConfig.wikiLinks[sponsorTime.category]
|| "https://wiki.sponsor.ajay.app/index.php/Segment_Categories"}
target="_blank" rel="noreferrer"> target="_blank" rel="noreferrer">
<img id={"sponsorTimeCategoriesHelpButton" + this.idSuffix} <img id={"sponsorTimeCategoriesHelpButton" + this.idSuffix}
className="helpButton" className="helpButton"
@@ -199,8 +200,9 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
</div> </div>
{/* Action Type */} {/* Action Type */}
{CompileConfig.categorySupport[sponsorTime.category]?.length > 1 {CompileConfig.categorySupport[sponsorTime.category] &&
|| CompileConfig.categorySupport[sponsorTime.category][0] !== "skip" ? ( (CompileConfig.categorySupport[sponsorTime.category]?.length > 1
|| CompileConfig.categorySupport[sponsorTime.category]?.[0] !== "skip") ? (
<div style={{position: "relative"}}> <div style={{position: "relative"}}>
<select id={"sponsorTimeActionTypes" + this.idSuffix} <select id={"sponsorTimeActionTypes" + this.idSuffix}
className="sponsorTimeEditSelector sponsorTimeActionTypes" className="sponsorTimeEditSelector sponsorTimeActionTypes"