@akinon/pz-masterpass 1.34.0 → 1.35.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @akinon/pz-masterpass
2
2
 
3
+ ## 1.35.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f3b595e: ZERO-2523: fix otp modal re-open state problem
8
+
3
9
  ## 1.34.0
4
10
 
5
11
  ## 1.33.2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/pz-masterpass",
3
- "version": "1.34.0",
3
+ "version": "1.35.0",
4
4
  "license": "MIT",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.d.ts",
@@ -10,7 +10,7 @@ import { formCreator } from '../../utils';
10
10
  import CountdownTimer from '../countdown-timer/countdown-timer';
11
11
  import { OtpForm, OtpFormProps, defaultTranslations } from './otp-form';
12
12
  import { useAppDispatch, useAppSelector } from '@akinon/next/redux/hooks';
13
- import { setOtpResponse } from '../../redux/reducer';
13
+ import { setOtpModalVisible, setOtpResponse } from '../../redux/reducer';
14
14
  import { Image } from '@akinon/next/components/image';
15
15
 
16
16
  export interface MasterpassOtpModalProps {
@@ -97,6 +97,10 @@ export const MasterpassOtpModal = ({
97
97
  setOtpTime(otpTimeout + nowInMs);
98
98
  };
99
99
 
100
+ const handleModalVisibility = (visibility: boolean) => {
101
+ dispatch(setOtpModalVisible(visibility));
102
+ };
103
+
100
104
  useEffect(() => {
101
105
  setIsModalOpen(otp.isModalVisible);
102
106
  }, [otp.isModalVisible]);
@@ -119,7 +123,7 @@ export const MasterpassOtpModal = ({
119
123
  />
120
124
  }
121
125
  open={isModalOpen}
122
- setOpen={setIsModalOpen}
126
+ setOpen={handleModalVisibility}
123
127
  className="w-full sm:w-[28rem] max-h-[90vh] overflow-y-auto"
124
128
  >
125
129
  <div className="px-6 py-4">