PageSourceSearch

https://www.fedacash.com/assets/_login-BrcS-ng7.js

js fedacash.com collected 2026-10-02 01:30:03 UTC 5,575 bytes, 1 lines download raw bytes

1import{j as e}from"./jsx-runtime-Dx2DxZNf.js";import{I as s}from"./input-DL6NcH6M.js";import{L as t}from"./label-B5kNyBse.js";import{P as r}from"./password-input-rujD_wL7.js";import{S as a}from"./submit-button-BN-lbGZf.js";import{u as i}from"./use-safe-user-store-Dlt79epp.js";import{r as n}from"./index-omYkHBZa.js";import{t as l}from"./index-CvIaG8Zr.js";import{L as o}from"./build.umd-C1mQCKkI.js";import{C as d}from"./client-only-C1liWBH5.js";import{R as c}from"./recaptcha-wrapper-fBTqYGiw.js";import{G as m}from"./google-play-badge-CbOw23eg.js";import{c as u,a as x,F as p,L as h}from"./components-B1hXa102.js";import{a as j,c as f}from"./index-BToWjq6v.js";import"./button-25n5LjCi.js";import"./index-CO6sA9dI.js";import"./index-DUeI-yz7.js";import"./index-iUOoGV2s.js";import"./eye-B6uPVeAz.js";import"./createLucideIcon-Vd8JvBZT.js";import"./eye-off-BZbkkdeK.js";import"./loader-circle-Bl5uwh8A.js";import"./auth-store-provider-DzKlh0o-.js";import"./react-BhoNohdX.js";import"./index-Br6sHyI-.js";import"./hoist-non-react-statics.cjs-BKDJl0X4.js";const g=()=>[{title:"Login | FedaCash SMEs"},{name:"description",content:"Login to your Fedacash SME account"}];function b(){const{siteKey:g,recaptchaEnabled:b}=u(),v=x(),y=j(),N=f(),L=i(e=>e?.setUser),[w,S]=n.useState(null),[C,E]=n.useState(!1),[P,R]=n.useState(!1),[k,A]=n.useState(""),[F,T]=n.useState(null),[M,z]=n.useState(!1),B=n.useRef(null),D=n.useRef(null);n.useEffect(()=>{if(v)if(v.success){z(!0),L(v.data),o.identify(v.data.id,{name:`${v.data.first_name} ${v.data.last_name}`,email:v.data.email});const e=v.message||"Login successful!";l.success(e),setTimeout(()=>{window.location.href="/dashboard"},500)}else{const e=v.message||"An unexpected error occurred. Please try again.";T(e),b&&(S(null),B.current?.reset()),D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{T(null)},1e4)}},[v,L,y,b]),n.useEffect(()=>()=>{D.current&&clearTimeout(D.current)},[]),n.useEffect(()=>{const e=document.querySelector("form"),s=()=>{e&&E(e.checkValidity())};return e?.addEventListener("input",s),s(),()=>e?.removeEventListener("input",s)},[]);const H="submitting"===N.state;return e.jsxs(e.Fragment,{children:[M&&e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center",children:e.jsxs("div",{className:"bg-white rounded-lg p-8 shadow-2xl flex flex-col items-center space-y-4",children:[e.jsxs("div",{className:"relative w-16 h-16",children:[e.jsx("div",{className:"absolute inset-0 border-4 border-fedacash/20 rounded-full"}),e.jsx("div",{className:"absolute inset-0 border-4 border-fedacash border-t-transparent rounded-full animate-spin"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-lg font-medium text-gray-900",children:"Logging you in..."}),e.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"Redirecting to dashboard"})]})]})}),e.jsxs("section",{className:"mt-24 lg:my-36 space-y-4",children:[e.jsx("h1",{className:"mb-12 text-2xl lg:text-3xl font-medium font-geist",children:"Sign in to Your Account"}),e.jsxs(p,{method:"post",className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(t,{children:"Email Address"}),e.jsx(s,{name:"email",type:"email",placeholder:"Enter your email",required:!0})]}),e.jsxs("div",{children:[e.jsx(t,{children:"Password"}),e.jsx(r,{name:"",onValidityChange:e=>R(e),onPasswordChange:e=>A(e)}),e.jsx("input",{type:"hidden",name:"password",value:k}),e.jsx(h,{to:"/auth/forgot-password",className:"text-sm text-fedacash/80 hover:text-fedacash/90 mt-1 inline-block",children:"Forgot password?"})]}),b&&e.jsx(d,{fallback:e.jsx("div",{children:"Loading reCAPTCHA..."}),children:()=>e.jsxs(e.Fragment,{children:[e.jsx(c,{ref:B,sitekey:g,onChange:e=>S(e),onExpired:()=>S(null),onErrored:()=>{S(null),T("reCAPTCHA error. Please try again.")}}),e.jsx("input",{type:"hidden",name:"g-recaptcha-response",value:w??""})]})}),e.jsx(a,{disabled:b&&!w||!C||!P||H,isSubmitting:H,className:"w-full h-9",children:"Login"}),F&&e.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded-md relative animate-in fade-in slide-in-from-top-2 duration-300",children:e.jsxs("div",{className:"flex items-start",children:[e.jsx("svg",{className:"w-5 h-5 mr-2 flex-shrink-0 mt-0.5",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),e.jsx("span",{className:"text-sm",children:F}),e.jsx("button",{type:"button",onClick:()=>T(null),className:"ml-auto -mr-1 -mt-1 p-1 hover:bg-red-100 rounded","aria-label":"Dismiss error",children:e.jsx("svg",{className:"w-4 h-4",fill:"
1currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})})]}),e.jsxs("div",{className:"text-right text-slate-600",children:["Don't have an account?"," ",e.jsx(h,{to:"/auth/register",className:"text-fedacash underline",children:"Sign Up"})]}),e.jsxs("div",{className:"mt-6 flex flex-col items-center gap-2 border-t border-slate-100 pt-6 text-center",children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Prefer the mobile app?"}),e.jsx(m,{})]})]})]})}export{b as default,g as meta};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.