Skip to content

Commit

Permalink
clean up redundant context updates
Browse files Browse the repository at this point in the history
  • Loading branch information
MariiaNebesnova committed Jul 28, 2023
1 parent 7dd05fa commit af1af6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/features/onboarding/utils/tourSteps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ export const createPOSteps = (refs: Record<OnbrdStep, StepRef>) => [
];

export const addLocatorsSteps = (refs: Record<OnbrdStep, StepRef>, isCustomLocatorFlow: boolean) => {

return [
customLocator(refs, isCustomLocatorFlow),
isCustomLocatorFlow ? createCustomLocator(refs) : contextMenu(refs),
Expand Down
4 changes: 2 additions & 2 deletions src/features/onboarding/utils/useOnboardingRef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const useOnBoardingRef = (
refName === OnbrdStep.EditLocator && isCustomLocatorFlow && ref.current
? { current: ref.current.closest(".ant-modal-content") }
: ref;
(!isSkipHook && !isRedundantStep) && addRef(refName, _ref, onClickNext, onClickPrev);
!isSkipHook && !isRedundantStep && addRef(refName, _ref, onClickNext, onClickPrev);
}, [ref, isFirstLocatorChecked]);

return (!isSkipHook && !isRedundantStep) ? ref : null;
return !isSkipHook && !isRedundantStep ? ref : null;
};

0 comments on commit af1af6b

Please sign in to comment.