feature show toast for project save failure #1393

This commit is contained in:
Sai Jatin K 2020-06-23 22:11:10 +05:30
parent b8ba3b911d
commit e057d717c1
No known key found for this signature in database
GPG Key ID: 58A469B796EA80DF
1 changed files with 4 additions and 0 deletions

View File

@ -167,6 +167,8 @@ export function saveProject(selectedFile = null, autosave = false) {
.catch((error) => {
const { response } = error;
dispatch(endSavingProject());
dispatch(setToastText('Failed to save project.'));
dispatch(showToast(1500));
if (response.status === 403) {
dispatch(showErrorModal('staleSession'));
} else if (response.status === 409) {
@ -207,6 +209,8 @@ export function saveProject(selectedFile = null, autosave = false) {
.catch((error) => {
const { response } = error;
dispatch(endSavingProject());
dispatch(setToastText('Failed to save project.'));
dispatch(showToast(1500));
if (response.status === 403) {
dispatch(showErrorModal('staleSession'));
} else {