fix: remove all unused variables and added dependecies to useEffect and useCallback (#3013)
This commit is contained in:
parent
691666e5e2
commit
92cb1834a5
23 changed files with 89 additions and 95 deletions
|
|
@ -36,7 +36,7 @@ const OnboardingPage: NextPageWithLayout = observer(() => {
|
|||
const {
|
||||
user: { currentUser, updateCurrentUser, updateUserOnBoard },
|
||||
workspace: workspaceStore,
|
||||
trackEvent: { postHogEventTracker }
|
||||
trackEvent: { postHogEventTracker },
|
||||
} = useMobxStore();
|
||||
const router = useRouter();
|
||||
|
||||
|
|
@ -78,19 +78,18 @@ const OnboardingPage: NextPageWithLayout = observer(() => {
|
|||
const finishOnboarding = async () => {
|
||||
if (!user || !workspaces) return;
|
||||
|
||||
await updateUserOnBoard().then(() => {
|
||||
postHogEventTracker(
|
||||
"USER_ONBOARDING_COMPLETE",
|
||||
{
|
||||
await updateUserOnBoard()
|
||||
.then(() => {
|
||||
postHogEventTracker("USER_ONBOARDING_COMPLETE", {
|
||||
user_role: user.role,
|
||||
email: user.email,
|
||||
user_id: user.id,
|
||||
status: "SUCCESS"
|
||||
}
|
||||
)
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
})
|
||||
status: "SUCCESS",
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
router.replace(`/${workspaces[0].slug}`);
|
||||
};
|
||||
|
|
@ -133,7 +132,7 @@ const OnboardingPage: NextPageWithLayout = observer(() => {
|
|||
};
|
||||
|
||||
handleStepChange();
|
||||
}, [user, invitations, step]);
|
||||
}, [user, invitations, step, updateCurrentUser, workspaces]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue