You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to send to backend info that user took a tour to prevent showing it next time refreshes. I use callback prop. The problem is it is fired every change and I am no luck in guessing which combination will be a situation after user clicks Last Next button ONCE only.
Now I have below code and this condition is met twice:
const handleJoyrideCallback = async ({
status,
index,
}: CallBackProps): Promise<void> => {
if (status === "finished" && index === steps.length - 1) { //send to backend }
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I would like to send to backend info that user took a tour to prevent showing it next time refreshes. I use
callback
prop. The problem is it is fired every change and I am no luck in guessing which combination will be a situation after user clicks Last Next button ONCE only.Now I have below code and this condition is met twice:
Beta Was this translation helpful? Give feedback.
All reactions