@tap-payments/auth-jsconnect 2.1.1-test → 2.1.2-test

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.
@@ -354,6 +354,7 @@ export var taxSlice = createSlice({
354
354
  .addCase(updateLeadSuccess.fulfilled, function (state, action) {
355
355
  var _a;
356
356
  state.loading = false;
357
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateBoardSuccessLoading: false });
357
358
  state.error = null;
358
359
  var response = (action.payload || {}).response;
359
360
  var description = (((_a = response === null || response === void 0 ? void 0 : response.errors) === null || _a === void 0 ? void 0 : _a[0]) || {}).description;
@@ -366,10 +367,12 @@ export var taxSlice = createSlice({
366
367
  })
367
368
  .addCase(updateLeadSuccess.pending, function (state) {
368
369
  state.loading = true;
370
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateBoardSuccessLoading: true });
369
371
  state.error = null;
370
372
  })
371
373
  .addCase(updateLeadSuccess.rejected, function (state, action) {
372
374
  state.loading = false;
375
+ state.data.verify.responseBody = __assign(__assign({}, state.data.verify.responseBody), { updateBoardSuccessLoading: false });
373
376
  state.error = action.error.message;
374
377
  });
375
378
  }
@@ -7,10 +7,14 @@ import { bankSelector, updateBoardSuccess } from '../../../app/bank/bankStore';
7
7
  var Success = function (_a) {
8
8
  var t = useTranslation().t;
9
9
  var dispatch = useAppDispatch();
10
- var _b = useAppSelector(bankSelector), loading = _b.loading, error = _b.error;
11
- var onSuccess = function () {
10
+ var _b = useAppSelector(bankSelector), error = _b.error, loading = _b.loading;
11
+ var _c = React.useState(false), clicked = _c[0], setClicked = _c[1];
12
+ React.useEffect(function () {
12
13
  dispatch(updateBoardSuccess());
14
+ }, []);
15
+ var onSuccess = function () {
16
+ setClicked(true);
13
17
  };
14
- return (_jsx(SuccessScreen, { title: t('bank_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: loading, error: error || '' }));
18
+ return (_jsx(SuccessScreen, { title: t('bank_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: clicked && loading, error: error || '' }));
15
19
  };
16
20
  export default React.memo(Success);
@@ -7,10 +7,14 @@ import SuccessScreen from '../../../shared/SuccessScreen';
7
7
  var Success = function (_a) {
8
8
  var t = useTranslation().t;
9
9
  var dispatch = useAppDispatch();
10
- var _b = useAppSelector(entitySelector), loading = _b.loading, error = _b.error;
11
- var onSuccess = function () {
10
+ var _b = useAppSelector(entitySelector), error = _b.error, loading = _b.loading;
11
+ var _c = React.useState(false), clicked = _c[0], setClicked = _c[1];
12
+ React.useEffect(function () {
12
13
  dispatch(updateBoardSuccess());
14
+ }, []);
15
+ var onSuccess = function () {
16
+ setClicked(true);
13
17
  };
14
- return (_jsx(SuccessScreen, { title: t('entity_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: loading, error: error || '' }));
18
+ return (_jsx(SuccessScreen, { title: t('entity_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: clicked && loading, error: error || '' }));
15
19
  };
16
20
  export default React.memo(Success);
@@ -7,10 +7,14 @@ import SuccessScreen from '../../../shared/SuccessScreen';
7
7
  var Success = function (_a) {
8
8
  var t = useTranslation().t;
9
9
  var dispatch = useAppDispatch();
10
- var _b = useAppSelector(individualSelector), loading = _b.loading, error = _b.error;
11
- var onSuccess = function () {
10
+ var _b = useAppSelector(individualSelector), error = _b.error, loading = _b.loading;
11
+ var _c = React.useState(false), clicked = _c[0], setClicked = _c[1];
12
+ React.useEffect(function () {
12
13
  dispatch(updateBoardSuccess());
14
+ }, []);
15
+ var onSuccess = function () {
16
+ setClicked(true);
13
17
  };
14
- return (_jsx(SuccessScreen, { title: t('individual_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: loading, error: error || '' }));
18
+ return (_jsx(SuccessScreen, { title: t('individual_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: clicked && loading, error: error || '' }));
15
19
  };
16
20
  export default React.memo(Success);
@@ -36,7 +36,8 @@ var ContainerStyled = styled(Container)(function (_a) {
36
36
  return ({
37
37
  justifyContent: 'space-between',
38
38
  minHeight: theme.spacing(30),
39
- alignItems: 'center'
39
+ alignItems: 'center',
40
+ pointerEvents: 'auto'
40
41
  });
41
42
  });
42
43
  var IconStyled = styled(Icon)(function (_a) {
@@ -7,10 +7,16 @@ import SuccessScreen from '../../../shared/SuccessScreen';
7
7
  var Success = function (_a) {
8
8
  var t = useTranslation().t;
9
9
  var dispatch = useAppDispatch();
10
- var _b = useAppSelector(taxSelector), loading = _b.loading, error = _b.error;
11
- var onSuccess = function () {
10
+ var _b = useAppSelector(taxSelector), error = _b.error, data = _b.data;
11
+ var _c = React.useState(false), clicked = _c[0], setClicked = _c[1];
12
+ var responseBody = data.verify.responseBody;
13
+ var updateBoardSuccessLoading = (responseBody || {}).updateBoardSuccessLoading;
14
+ React.useEffect(function () {
12
15
  dispatch(updateLeadSuccess());
16
+ }, []);
17
+ var onSuccess = function () {
18
+ setClicked(true);
13
19
  };
14
- return (_jsx(SuccessScreen, { title: t('tax_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: loading, error: error || '' }));
20
+ return (_jsx(SuccessScreen, { title: t('tax_success_title'), onSuccess: onSuccess, successTitle: t('continue'), loading: clicked && updateBoardSuccessLoading, error: error || '' }));
15
21
  };
16
22
  export default React.memo(Success);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.1.1-test",
3
+ "version": "2.1.2-test",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",