@seontechnologies/seon-id-verification
Version:
An advanced SDK featuring web components for natural person identification through document scanning, facial recognition, hand gesture, and face turning detection, designed for secure and efficient user verification.
16 lines (15 loc) • 1.31 kB
JavaScript
import { a as r, j as e, S as n, l as a, L as c } from "./index-oGnhSncZ.mjs";
import { useEffect as o } from "react";
import { c as d } from "./SessionDetails-D7H83xOl.mjs";
const p = ({ onNext: s, isPolling: i = !0 }) => (o(() => {
if (!i)
return;
const l = setInterval(async () => {
const t = await d(!0);
(t != null && t.userFinished || (t == null ? void 0 : t.sessionStatus) === "ABANDONED" || (t == null ? void 0 : t.sessionStatus) === "INVALIDATED") && (clearInterval(l), s());
}, r.config.resultPollingInterval * 1e3);
return () => clearInterval(l);
}, [i, s]), e.jsx(n, { children: e.jsx("div", { className: "tw-flex tw-flex-col tw-gap-12", children: e.jsxs("div", { className: "tw-text-primary-on-light-100 dark:tw-text-primary-on-light-100-dark tw-flex tw-flex-col tw-gap-12", children: [e.jsxs("div", { className: "tw-w-full tw-text-left tw-flex tw-flex-col tw-gap-[6px]", children: [e.jsx("h1", { id: "w-title", children: a.ongoing_screen_title }), e.jsx("p", { id: "w-description", className: "label tw-text-secondary-on-light-60 dark:tw-text-secondary-on-light-60-dark", children: a.ongoing_screen_description })] }), e.jsx("div", { className: "tw-flex tw-flex-col tw-justify-center tw-items-center tw-py-8", children: e.jsx(c, {}) })] }) }) }));
export {
p as default
};