Reset any set release time if switching to live stream mode.

This commit is contained in:
Dan Peterson 2021-12-30 10:32:46 -06:00 committed by Thomas Zarebczan
parent 4ec4942d8c
commit fef289e4fe

View file

@ -569,6 +569,13 @@ function PublishForm(props: Props) {
setShowSchedulingOptions(isLivestreamMode && fileSelectSource === SOURCE_NONE);
}, [isLivestreamMode, fileSelectSource]);
// Reset any set release time if switching to live stream mode.
useEffect(() => {
if (mode === PUBLISH_MODES.LIVESTREAM) {
updatePublishForm({ releaseTimeEdited: undefined });
}
}, [mode, updatePublishForm]);
if (publishing) {
return (
<div className="main--empty">