PageSourceSearch

https://lendmatchpro.ai/assets/BrokerageLogin-DYThGeqB.js

js lendmatchpro.ai collected 2026-10-05 15:03:54 UTC 4,110 bytes, 1 lines download raw bytes

1import{j as e}from"./ui-vendor-CwKPOJE8.js";import{r as o,L as s}from"./react-vendor-BoB-7tOT.js";import{u as v,aS as f,L as d,I as m,aN as N,H as w,B as y,Q as k}from"./index-BdZNXa7t.js";import{u as L}from"./useLoginAuth-B2YccIf5.js";import{u as S}from"./useLoginRedirect-Bhso3kgQ.js";import"./supabase-QBQ6M2WM.js";import"./utils-BomB368b.js";import"./charts-DdJgN9kB.js";const T=()=>{const{toast:r}=v(),{login:x,loading:a}=L(),[n,h]=o.useState(""),[i,u]=o.useState(""),[l,g]=o.useState(!1),[p,b]=o.useState(!1);S({expectedUserType:"agent",redirectPath:"/agent/dashboard",enabled:p});const j=async t=>{if(t.preventDefault(),!n||!i){r({title:"Error",description:"Please fill in all fields",variant:"destructive"});return}try{const c=await x(n,i,"agent");c.success?(r({title:"Welcome back!",description:"Taking you to your brokerage console."}),b(!0)):r({title:"Login failed",description:c.error||"Invalid credentials",variant:"destructive"})}catch{r({title:"Error",description:"An unexpected error occurred. Please try again.",variant:"destructive"})}};return e.jsx("div",{className:"min-h-screen bg-gradient-to-br from-amber-50 to-white flex items-center justify-center p-4",children:e.jsx("div",{className:"w-full max-w-md",children:e.jsxs("div",{className:"bg-white rounded-2xl shadow-xl p-8",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-amber-100 rounded-full mb-4",children:e.jsx(f,{className:"w-8 h-8 text-amber-600"})}),e.jsx("h1",{className:"text-2xl font-bold text-stone-900",children:"Real Estate Brokerage Login"}),e.jsx("p",{className:"text-stone-600 mt-2",children:"Access your brokerage console"})]}),e.jsxs("form",{onSubmit:j,className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx(d,{htmlFor:"email",children:"Email Address"}),e.jsx(m,{id:"email",type:"email",placeholder:"[email protected]",value:n,onChange:t=>h(t.target.value),className:"mt-1",required:!0,disabled:a})]}),e.jsxs("div",{children:[e.jsx(d,{htmlFor:"password",children:"Password"}),e.jsxs("div",{className:"relative mt-1",children:[e.jsx(m,{id:"password",type:l?"text":"password",placeholder:"Enter your password",value:i,onChange:t=>u(t.target.value),required:!0,disabled:a}),e.jsx("button",{type:"button",onClick:()=>g(!l),className:"absolute right-3 top-1/2 -translate-y-1/2 text-stone-500 hover:text-stone-700",children:l?e.jsx(N,{className:"w-4 h-4"}):e.jsx(w,{className:"w-4 h-4"})})]})]}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(s,{to:"/forgot-password",className:"text-sm text-amber-700 hover:text-amber-800",children:"Forgot password?"})}),e.jsx(y,{type:"submit",className:"w-full bg-amber-600 hover:bg-amber-700",disabled:a,children:a?e.jsxs(e.Fragment,{children:[e.jsx(k,{className:"mr-2 h-4 w-4 animate-spin"}),"Signing in..."]}):"Sign In"})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-sm text-stone-600",children:["Want a brokerage account?"," ",e.jsx(s,{to:"/for-real-estate-brokerages",className:"font-medium text-amber-700 hover:text-amber-800",children:"See how it works"})]})}),e.jsx("div",{className:"mt-6 pt-5 border-t border-stone-200 text-center",children:e.jsxs("p",{className:"text-xs text-stone-500 leading-relaxed",children:["Agents at your brokerage sign in at"," ",e.jsx(s,{to:"/agent-login",className:"text-amber-700 hover:text-amber-800",children:"agent login"}),". Either door works — you will land in the right place."]})}),e.jsx("div",{className:"mt-6 pt-5 border-t border-stone-200",children:e.jsxs("div",{className:"flex items-center justify-center space-x-4 text-sm",children:[e.jsx(s,{to:"/broker-login",className:"text-stone-600 hover:text-stone-800",children:"Broker Login"}),e.jsx("span",{className:"text-stone-400",children:"|"}),e.jsx(s,{to:"/lender-login",className:"text-stone-600 hover:text-stone-800",children:"Lender Login"}),e.jsx("span",{className:"text-stone-400",children:"|"}),e.jsx(s,{to:"/",className:"text-stone-600 hover:text-stone-800",children:"Home"})]})})]})})})};export{T as default};

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.