Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 3cfac38

Browse files
committed
add check on utils
1 parent e341c28 commit 3cfac38

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/utils/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import _ from 'lodash';
12
import moment from "moment";
23
import config from "../../config";
34

@@ -48,6 +49,7 @@ export const businessLogin = () => {
4849
};
4950

5051
/**
52+
* TODO: Re-check when onboarding processor is ready
5153
* Check Onboarding API
5254
*
5355
* @param resp {Object} User trait object
@@ -64,6 +66,16 @@ export function checkOnboarding(resp) {
6466
if (data.status === "completed") {
6567
return false;
6668
}
69+
70+
// TODO: Re-check when onboarding processor is ready.
71+
// It checks for at least one onboarding checklist was completed, then we don't enter onboarding flow
72+
// This logic will be changed.
73+
for (const item in data.metadata) {
74+
if (data.metadata[item]) {
75+
return false;
76+
}
77+
}
78+
6779
const steps = {
6880
"/onboard/": ["profile_picture", "skills"],
6981
"/onboard/contact-details": ["country"],

0 commit comments

Comments
 (0)