-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tsx
29 lines (25 loc) · 950 Bytes
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { Countries } from '@constants/enums';
import { selectProfileData } from '@pages/profile/store/selectors';
import { useMemo } from 'react';
import { useSelector } from 'react-redux';
import ColombiaOnboarding from './Colombia';
import MexicoOnboarding from './Mexico';
import UsaOnboarding from './USA';
import AuthInitializer from '@/modules/auth/AuthInitializer';
import SessionTimeout from '@/modules/SessionTimeout';
const Onboarding = () => {
const userProfile = useSelector(selectProfileData);
const countryOrigin = useMemo(
() => userProfile?.company.country,
[userProfile?.company.country]
);
return (
<AuthInitializer>
<SessionTimeout />
{countryOrigin === Countries.MX ? <MexicoOnboarding /> : null}
{countryOrigin === Countries.USA ? <UsaOnboarding /> : null}
{countryOrigin === Countries.COL ? <ColombiaOnboarding /> : null}
</AuthInitializer>
);
};
export default Onboarding;