@tap-payments/auth-jsconnect 2.9.31-development → 2.9.32-development
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.
|
@@ -15,7 +15,7 @@ import { handleNextScreenStep, settingsSelector } from '../../../../app/settings
|
|
|
15
15
|
import Box from '@mui/material/Box';
|
|
16
16
|
import { styled } from '@mui/material/styles';
|
|
17
17
|
import { useAppDispatch, useAppSelector, useLanguage, useSanitizedTranslation } from '../../../../hooks';
|
|
18
|
-
import { getWebsiteLink, isSA, maskIDNumber } from '../../../../utils';
|
|
18
|
+
import { getWebsiteLink, isOtherThanKWOrSA, isSA, maskIDNumber } from '../../../../utils';
|
|
19
19
|
import { CONNECT_FLOWS, EXTERNAL_LINKS } from '../../../../constants';
|
|
20
20
|
import Button from '../../../shared/Button';
|
|
21
21
|
import ScreenContainer from '../../../shared/Containers/ScreenContainer';
|
|
@@ -55,6 +55,7 @@ export var Terms = function () {
|
|
|
55
55
|
var termsAndConditionsLink = getWebsiteLink(isAr, countryCode, EXTERNAL_LINKS.TERMS_CONDITIONS);
|
|
56
56
|
var privacyPolicyLink = getWebsiteLink(isAr, countryCode, EXTERNAL_LINKS.PRIVACY_POLICY);
|
|
57
57
|
var isSACountry = React.useMemo(function () { return isSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
58
|
+
var isOtherThanKWOrSACountry = React.useMemo(function () { return isOtherThanKWOrSA(settingsData.businessCountry.iso2); }, [settingsData.businessCountry.iso2]);
|
|
58
59
|
var onNext = function () {
|
|
59
60
|
if (hasOneUserOnly) {
|
|
60
61
|
if (isSACountry) {
|
|
@@ -76,6 +77,11 @@ export var Terms = function () {
|
|
|
76
77
|
}
|
|
77
78
|
dispatch(handleNextScreenStep(CONNECT_FLOWS.kyc.users));
|
|
78
79
|
};
|
|
79
|
-
|
|
80
|
+
var getNextButtonTitle = function () {
|
|
81
|
+
if (isOtherThanKWOrSACountry)
|
|
82
|
+
return st('continue');
|
|
83
|
+
return isSACountry ? st('approve_with_nafath_app') : st('approve_with_paci_app');
|
|
84
|
+
};
|
|
85
|
+
return (_jsxs(ScreenContainer, { children: [_jsx(Header, { idNumber: idNumber }), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_terms_conditions') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_refund_policy') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(termsAndConditionsLink); } }, { children: st('kyc_dispute_policy') })), _jsx(BoxStyled, __assign({ onClick: function () { return redirect(privacyPolicyLink); }, sx: { mb: error ? 3 : 0 } }, { children: st('kyc_privacy_policy') })), _jsx(Button, __assign({ disabled: isOtherThanKWOrSACountry, sx: { mt: 3 }, disableBack: true, isAr: isAr, loading: loading, error: st(error || ''), onClick: onNext }, { children: getNextButtonTitle() }))] }));
|
|
80
86
|
};
|
|
81
87
|
export default memo(Terms);
|