@akinon/pz-otp 1.26.0-rc.8 → 1.26.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,30 +1,6 @@
1
1
  # @akinon/pz-otp
2
2
 
3
- ## 1.26.0-rc.8
4
-
5
- ## 1.26.0-rc.7
6
-
7
- ## 1.26.0-rc.6
8
-
9
- ## 1.26.0-rc.5
10
-
11
- ### Minor Changes
12
-
13
- - 42320c2: ZERO-2516: Add if there are errors in the OTP login
14
-
15
- ## 1.26.0-rc.4
16
-
17
- ## 1.26.0-rc.3
18
-
19
- ### Patch Changes
20
-
21
- - 073fbd2: ZERO-2503: Add check changeset control script
22
-
23
- ## 1.26.0-rc.2
24
-
25
- ## 1.26.0-rc.1
26
-
27
- ## 1.26.0-rc.0
3
+ ## 1.26.0
28
4
 
29
5
  ## 1.25.0
30
6
 
@@ -38,12 +14,6 @@
38
14
 
39
15
  - 95510c7: ZERO-2508: Enable rc branch pipeline and add check-publish-version step
40
16
 
41
- ## 1.25.0-rc.0
42
-
43
- ### Minor Changes
44
-
45
- - e20b27f: ZERO-2454:add otp login
46
-
47
17
  ## 1.24.0
48
18
 
49
19
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/pz-otp",
3
- "version": "1.26.0-rc.8",
3
+ "version": "1.26.0",
4
4
  "license": "MIT",
5
5
  "main": "src/index.tsx",
6
6
  "peerDependencies": {
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 = {
@@ -42,7 +42,6 @@ type OtpProps = {
42
42
  classes?: {
43
43
  [c in ComponentClasses]?: string;
44
44
  };
45
- error?: string;
46
45
  };
47
46
 
48
47
  export const Otp = ({
@@ -51,8 +50,7 @@ export const Otp = ({
51
50
  codeLength = 6,
52
51
  timer = 60,
53
52
  texts,
54
- classes,
55
- error
53
+ classes
56
54
  }: OtpProps) => {
57
55
  const [otp, setOtp] = useState('');
58
56
  const [canResend, setCanResend] = useState(false);
@@ -72,7 +70,7 @@ export const Otp = ({
72
70
  data.code = otp;
73
71
  const res = await submitAction(data);
74
72
 
75
- if (res?.status !== 200 || error) {
73
+ if (res.status !== 200) {
76
74
  setHasError(true);
77
75
  }
78
76
  }
@@ -180,7 +178,6 @@ export const Otp = ({
180
178
  renderInput={({ style, ...props }) => <input {...props} />}
181
179
  skipDefaultStyles={true}
182
180
  />
183
- {error && <p className="text-xs text-error mt-2">{error}</p>}
184
181
  <Button
185
182
  type="submit"
186
183
  className={twMerge(