Skip to content

Commit

Permalink
remove step arg
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed Oct 26, 2022
1 parent e09574a commit aa676d5
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ export const RealTourContextProvider = ({ children }: { children: ReactChild })
const isTourShown = useCallback((stepId: SecurityStepId) => tourStatus[stepId], [tourStatus]);
const [activeStep, _setActiveStep] = useState<number>(1);

const incrementStep = useCallback((stepId: SecurityStepId, step?: number) => {
_setActiveStep((prevState) =>
step != null && step <= securityTourConfig[stepId].length
? step
: (prevState >= securityTourConfig[stepId].length ? 0 : prevState) + 1
const incrementStep = useCallback((stepId: SecurityStepId) => {
_setActiveStep(
(prevState) => (prevState >= securityTourConfig[stepId].length ? 0 : prevState) + 1
);
}, []);

Expand Down

0 comments on commit aa676d5

Please sign in to comment.