reaxify 0.0.68 → 0.0.69

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.
@@ -1 +1 @@
1
- "use client";"use strict";const u=require("react");function l(o){const s=u.useRef(null);u.useEffect(()=>{var t,c;s.current=new AbortController;const e=s.current;return(c=(t=navigator==null?void 0:navigator.credentials)==null?void 0:t.get)==null||c.call(t,{otp:{transport:["sms"]},signal:e.signal}).then(n=>{const r=n;o((r==null?void 0:r.code)||null)}).catch(n=>{console.error(n)}),()=>{e==null||e.abort("signal has been aborted.")}},[o])}module.exports=l;
1
+ "use client";"use strict";const c=require("react");function a(l){const o=c.useRef(null);c.useEffect(()=>{var t,s;o.current=new AbortController;const e=o.current;return(s=(t=navigator==null?void 0:navigator.credentials)==null?void 0:t.get)==null||s.call(t,{otp:{transport:["sms"]},signal:e.signal}).then(n=>{const r=n;l((r==null?void 0:r.code)||null)}).catch(n=>{console.error(n)}),()=>{e==null||e.abort("signal has been aborted.")}},[])}module.exports=a;
@@ -1,25 +1,25 @@
1
1
  "use client";
2
2
  import { useRef as a, useEffect as c } from "react";
3
- function i(r) {
4
- const s = a(null);
3
+ function i(l) {
4
+ const r = a(null);
5
5
  c(() => {
6
- var t, l;
7
- s.current = new AbortController();
8
- const e = s.current;
9
- return (l = (t = navigator == null ? void 0 : navigator.credentials) == null ? void 0 : t.get) == null || l.call(t, {
6
+ var t, s;
7
+ r.current = new AbortController();
8
+ const e = r.current;
9
+ return (s = (t = navigator == null ? void 0 : navigator.credentials) == null ? void 0 : t.get) == null || s.call(t, {
10
10
  // eslint-disable-next-line
11
11
  // @ts-ignore
12
12
  otp: { transport: ["sms"] },
13
13
  signal: e.signal
14
14
  }).then((n) => {
15
15
  const o = n;
16
- r((o == null ? void 0 : o.code) || null);
16
+ l((o == null ? void 0 : o.code) || null);
17
17
  }).catch((n) => {
18
18
  console.error(n);
19
19
  }), () => {
20
20
  e == null || e.abort("signal has been aborted.");
21
21
  };
22
- }, [r]);
22
+ }, []);
23
23
  }
24
24
  export {
25
25
  i as default
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "reaxify",
3
3
  "private": false,
4
- "version": "0.0.68",
4
+ "version": "0.0.69",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "files": [