Don't save the outfit while it's already saving
It's weird to be reading this code and be like. was this not always an issue? Maybe something in Apollo prevented this? Did we use optimistic UI or something? Idk? There's still an issue with it infinitely retrying in an error state though.
This commit is contained in:
parent
18ff22f211
commit
f8bcf5a0de
1 changed files with 2 additions and 0 deletions
|
@ -130,6 +130,7 @@ function useOutfitSaving(outfitState, dispatchToOutfit) {
|
|||
if (
|
||||
!isNewOutfit &&
|
||||
canSaveOutfit &&
|
||||
!isSaving &&
|
||||
debouncedOutfitStateIsSaveable &&
|
||||
!outfitStatesAreEqual(debouncedOutfitState, outfitState.savedOutfitState)
|
||||
) {
|
||||
|
@ -143,6 +144,7 @@ function useOutfitSaving(outfitState, dispatchToOutfit) {
|
|||
}, [
|
||||
isNewOutfit,
|
||||
canSaveOutfit,
|
||||
isSaving,
|
||||
debouncedOutfitState,
|
||||
debouncedOutfitStateIsSaveable,
|
||||
outfitState.savedOutfitState,
|
||||
|
|
Loading…
Reference in a new issue