diff --git a/src/helpers/cloud.ts b/src/helpers/cloud.ts index 2d5d197..0a829c5 100644 --- a/src/helpers/cloud.ts +++ b/src/helpers/cloud.ts @@ -62,6 +62,7 @@ export const sync = async () => { await upload(file.id!, json); const now = Date.now(); dispatch(metaActions.setLastSyncedTime(now)); + dispatch(syncActions.setError(null)); } catch (err) { dispatch(syncActions.setError(err)); } diff --git a/src/store/slices/sync.ts b/src/store/slices/sync.ts index 35cdafa..976e152 100644 --- a/src/store/slices/sync.ts +++ b/src/store/slices/sync.ts @@ -18,7 +18,7 @@ const slice = createSlice({ const { payload } = action; state.loading = payload; }, - setError: (state, action: PayloadAction) => { + setError: (state, action: PayloadAction) => { const { payload } = action; state.error = payload; }