@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 +1 -1
- package/package.json +1 -1
- package/src/views/Otp.tsx +5 -3
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/views/Otp.tsx
CHANGED
|
@@ -22,9 +22,9 @@ enum ComponentWrapper {
|
|
|
22
22
|
Otp = 'otp'
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
type ComponentClassKey =
|
|
25
|
+
type ComponentClassKey = typeof Component[keyof typeof Component];
|
|
26
26
|
type ComponentWrapperClassKey =
|
|
27
|
-
`${
|
|
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);
|