force type=file if livestream disabled
This commit is contained in:
parent
0e2a7e0997
commit
9b6ffa404b
1 changed files with 9 additions and 3 deletions
|
@ -122,6 +122,7 @@ function PublishForm(props: Props) {
|
|||
isLivestreamClaim,
|
||||
isPostClaim,
|
||||
permanentUrl,
|
||||
} = props;
|
||||
|
||||
const { replace, location } = useHistory();
|
||||
const urlParams = new URLSearchParams(location.search);
|
||||
|
@ -370,7 +371,7 @@ function PublishForm(props: Props) {
|
|||
useEffect(() => {
|
||||
updatePublishForm({
|
||||
isMarkdownPost: mode === PUBLISH_MODES.POST,
|
||||
isLivestreamPublish: isLivestreamMode,
|
||||
isLivestreamPublish: mode === PUBLISH_MODES.LIVESTREAM,
|
||||
});
|
||||
}, [mode, updatePublishForm]);
|
||||
|
||||
|
@ -409,14 +410,19 @@ function PublishForm(props: Props) {
|
|||
}
|
||||
// LiveStream publish
|
||||
if (_uploadType === PUBLISH_MODES.LIVESTREAM.toLowerCase() && livestreamEnabled) {
|
||||
setMode(PUBLISH_MODES.LIVESTREAM);
|
||||
if (enableLivestream) {
|
||||
setMode(PUBLISH_MODES.LIVESTREAM);
|
||||
} else {
|
||||
setMode(PUBLISH_MODES.FILE);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Default to standard file publish
|
||||
setMode(PUBLISH_MODES.FILE);
|
||||
}, [uploadType, livestreamEnabled]);
|
||||
}, [uploadType, enableLivestream]);
|
||||
|
||||
// if we have a type urlparam, update it? necessary?
|
||||
useEffect(() => {
|
||||
if (!uploadType) return;
|
||||
const newParams = new URLSearchParams();
|
||||
|
|
Loading…
Reference in a new issue