feat: add browser dialog to prevent navigation (#962)
Switching from undefined to "" tells the browser to put in a modal which requires users to confirm thier navigation away. this will prevent continued annoyances from upload failures: https://2u-internal.atlassian.net/browse/TNL-11587
This commit is contained in:
@@ -85,9 +85,12 @@ const VideosPage = ({
|
||||
useEffect(() => {
|
||||
window.onbeforeunload = () => {
|
||||
dispatch(markVideoUploadsInProgressAsFailed({ uploadingIdsRef, courseId }));
|
||||
if (addVideoStatus === RequestStatus.IN_PROGRESS) {
|
||||
return '';
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
}, []);
|
||||
}, [addVideoStatus]);
|
||||
|
||||
const {
|
||||
isVideoTranscriptEnabled,
|
||||
|
||||
Reference in New Issue
Block a user