From 1c196f45ba5b02d3fe857e62b6a9707209f3cb04 Mon Sep 17 00:00:00 2001 From: aaronshiel Date: Wed, 20 Sep 2023 16:18:20 -0700 Subject: [PATCH] properly check current setup step --- client/src/hooks/graphql/use-with-setup.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/hooks/graphql/use-with-setup.tsx b/client/src/hooks/graphql/use-with-setup.tsx index e31bd174..c4407f53 100644 --- a/client/src/hooks/graphql/use-with-setup.tsx +++ b/client/src/hooks/graphql/use-with-setup.tsx @@ -230,9 +230,9 @@ export function useWithSetup(search?: { i?: string }): UseWithSetup { return; } if (isMentorEdited) { - if (idx === SetupStepType.SELECT_KEYWORDS) { + if (steps[idx].type === SetupStepType.SELECT_KEYWORDS) { saveMentorKeywords(); - } else if (idx === SetupStepType.MENTOR_PRIVACY) { + } else if (steps[idx].type === SetupStepType.MENTOR_PRIVACY) { saveMentorPrivacy(); } else { saveMentorDetails();