Minor variable name change
This commit is contained in:
parent
34b69a5e2b
commit
dc6d5b5851
1 changed files with 4 additions and 3 deletions
|
@ -255,15 +255,16 @@ function useOutfitSaving(outfitState) {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
|
|
||||||
const isSaved = Boolean(outfitState.id);
|
// Whether this outfit has *ever* been saved, vs a brand-new local outfit.
|
||||||
|
const hasBeenSaved = Boolean(outfitState.id);
|
||||||
|
|
||||||
// Only logged-in users can save outfits - and they can only save new outfits,
|
// Only logged-in users can save outfits - and they can only save new outfits,
|
||||||
// or outfits they created.
|
// or outfits they created.
|
||||||
const canSaveOutfit =
|
const canSaveOutfit =
|
||||||
isLoggedIn &&
|
isLoggedIn &&
|
||||||
(!isSaved || outfitState.creator?.id === currentUserId) &&
|
(!hasBeenSaved || outfitState.creator?.id === currentUserId) &&
|
||||||
// TODO: Add support for updating outfits
|
// TODO: Add support for updating outfits
|
||||||
!isSaved;
|
!hasBeenSaved;
|
||||||
|
|
||||||
const [sendSaveOutfitMutation, { loading: isSaving }] = useMutation(
|
const [sendSaveOutfitMutation, { loading: isSaving }] = useMutation(
|
||||||
gql`
|
gql`
|
||||||
|
|
Loading…
Reference in a new issue