@akinon/pz-otp 2.0.35-beta.0 → 2.0.35

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,6 +1,6 @@
1
1
  # @akinon/pz-otp
2
2
 
3
- ## 2.0.35-beta.0
3
+ ## 2.0.35
4
4
 
5
5
  ## 2.0.34
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/pz-otp",
3
- "version": "2.0.35-beta.0",
3
+ "version": "2.0.35",
4
4
  "license": "MIT",
5
5
  "main": "./src/index.ts",
6
6
  "module": "./src/index.ts",
package/src/views/Otp.tsx CHANGED
@@ -22,9 +22,9 @@ enum ComponentWrapper {
22
22
  Otp = 'otp'
23
23
  }
24
24
 
25
- type ComponentClassKey = (typeof Component)[keyof typeof Component];
25
+ type ComponentClassKey = typeof Component[keyof typeof Component];
26
26
  type ComponentWrapperClassKey =
27
- `${(typeof ComponentWrapper)[keyof typeof ComponentWrapper]}Wrapper`;
27
+ `${typeof ComponentWrapper[keyof typeof ComponentWrapper]}Wrapper`;
28
28
  type ComponentClasses = ComponentClassKey | ComponentWrapperClassKey;
29
29
 
30
30
  type OtpProps = {
@@ -93,7 +93,9 @@ export const Otp = ({
93
93
  if (submitAction) {
94
94
  data.code = otp;
95
95
  data.phone = phone;
96
- const res = await submitAction(data);
96
+ const res = (await submitAction(data)) as
97
+ | { status?: number }
98
+ | undefined;
97
99
 
98
100
  if (res?.status !== 200 || error) {
99
101
  setHasError(true);