@opexa/portal-components 0.0.978 → 0.0.980
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25,7 +25,8 @@ export function KYCDefault(props) {
|
|
|
25
25
|
const isDialogOpen = globalStore.kyc.open &&
|
|
26
26
|
!globalStore.kycReminder.open &&
|
|
27
27
|
!sessionLoading &&
|
|
28
|
-
!globalStore.disclaimer.open
|
|
28
|
+
!globalStore.disclaimer.open &&
|
|
29
|
+
!globalStore.updateMobilePhoneNumber.open;
|
|
29
30
|
return (_jsxs(_Fragment, { children: [_jsx(KYCDefaultContext, { value: kyc, children: _jsx(Dialog.Root, { open: isDialogOpen, onOpenChange: (details) => {
|
|
30
31
|
globalStore.kyc.setOpen(details.open);
|
|
31
32
|
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: kyc.reset, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { className: "fixed top-[57px] overflow-hidden", children: _jsx(Dialog.Content, { className: "mx-auto h-full w-full overflow-y-auto bg-bg-primary-alt md:max-h-[95vh] lg:w-fit", children: _jsxs("div", { className: "mt-[calc(var(--safe-area-inset-top)*3)] flex h-dvh w-full flex-col overflow-y-auto p-3xl sm:h-fit lg:w-[400px]", children: [_jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto mb-5 block h-7.5 w-auto", draggable: false }), _jsx(Indicator, {}), kyc.step === 1 && _jsx(IdentityVerification, {}), kyc.step === 2 && _jsx(PersonalInformation, {})] }) }) })] }) }) }), _jsx(KYCReminder, { ...props }), _jsx(KYCReview, {})] }));
|
|
@@ -31,17 +31,26 @@ export function UpdateMobilePhoneNumber() {
|
|
|
31
31
|
const account = accountQuery.data;
|
|
32
32
|
const isAccountLoading = accountQuery.isLoading;
|
|
33
33
|
const hasMobileNumber = !!account?.mobileNumber;
|
|
34
|
-
|
|
34
|
+
const hasExecuted = useRef(false);
|
|
35
35
|
useEffect(() => {
|
|
36
|
-
if (!isAccountLoading && !!account && !
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
if (!isAccountLoading && !!account && !hasExecuted.current) {
|
|
37
|
+
if (!hasMobileNumber) {
|
|
38
|
+
console.log('No mobile number found');
|
|
39
|
+
globalStore.updateMobilePhoneNumber.setOpen(true);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
console.log('Mobile number found');
|
|
43
|
+
globalStore.updateMobilePhoneNumber.setOpen(false);
|
|
44
|
+
}
|
|
45
|
+
hasExecuted.current = true;
|
|
43
46
|
}
|
|
44
|
-
}, [
|
|
47
|
+
}, [
|
|
48
|
+
isAccountLoading,
|
|
49
|
+
account,
|
|
50
|
+
hasMobileNumber,
|
|
51
|
+
globalStore.updateMobilePhoneNumber,
|
|
52
|
+
]);
|
|
53
|
+
console.log('UpdateMobilePhoneNumber open:', globalStore.updateMobilePhoneNumber.open);
|
|
45
54
|
const [step, setStep] = useState(1);
|
|
46
55
|
const sendVerificationCodeMutation = useSendVerificationCodeMutation({
|
|
47
56
|
onSuccess: () => {
|