PageSourceSearch

https://startuplive.ngo/assets/Login-B8-zEvdP.js

js startuplive.ngo collected 2026-10-09 18:10:05 UTC 4,641 bytes, 1 lines download raw bytes

1import{r,u as L,d as S,j as e,L as f,s as D,t as a}from"./index-EuY_-FAY.js";import{B as E}from"./button-DwzNqib_.js";import{I as x}from"./input-CwLsOgdz.js";import{L as h}from"./label-DHjRMKAW.js";import{C as k,a as A,b as F,d as R,c as I}from"./card-CIFW0qNz.js";import{H as P}from"./Header-CLdbyLbk.js";import{F as H}from"./Footer-DLYBYlrH.js";import{A as B,a as T,b as W,c as q,d as M,e as O,f as Y,g as $}from"./alert-dialog-Dzo3XCPR.js";import{M as z}from"./mail-BVVKtkzs.js";import{L as G}from"./lock-BAVbJQ92.js";import{E as J}from"./eye-off-Cp1ZERv1.js";import{E as K}from"./eye-DWMmm-eV.js";import"./index-BJKYc_OV.js";import"./menu-QX_7UXmx.js";import"./index-BMKRCHpo.js";import"./index-Byc0C5HR.js";import"./index-DKmrCAge.js";import"./index-BSIHs9Yh.js";const ue=()=>{const[i,j]=r.useState(!1),[o,b]=r.useState(""),[d,w]=r.useState(""),[c,m]=r.useState(!1),[y,n]=r.useState(!1),[u,p]=r.useState(!1),l=L(),{signIn:v,user:g}=S();r.useEffect(()=>{g&&l("/dashboard")},[g,l]);const N=async()=>{p(!0);try{const{error:s}=await D.auth.resend({type:"signup",email:o,options:{emailRedirectTo:`${window.location.origin}/`}});s?a.error({title:"Failed to resend confirmation",description:s.message}):(a.success({title:"Confirmation email sent",description:"Please check your email inbox and confirm your account."}),n(!1))}catch(s){a.error({title:"Error",description:s.message||"Failed to resend confirmation email"})}finally{p(!1)}},C=async s=>{s.preventDefault(),m(!0);const{error:t}=await v(o,d);t?t.message.toLowerCase().includes("email not confirmed")||t.message.toLowerCase().includes("confirm your email")?n(!0):a.error({title:"Login failed",description:t.message||"Invalid email or password"}):(a.success({title:"Login successful",description:"Welcome back!"}),l("/dashboard")),m(!1)};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(P,{}),e.jsx("main",{className:"pt-24 pb-16",children:e.jsx("div",{className:"max-w-md mx-auto px-8",children:e.jsxs(k,{className:"shadow-lg",children:[e.jsxs(A,{className:"text-center",children:[e.jsx(F,{className:"text-2xl font-bold text-foreground",children:"Welcome Back"}),e.jsx(R,{className:"text-muted-foreground",children:"Sign in to your StartupLive account"})]}),e.jsx(I,{children:e.jsxs("form",{onSubmit:C,className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"email",className:"text-foreground font-medium",children:"Email"}),e.jsxs("div",{className:"relative",children:[e.jsx(z,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(x,{id:"email",type:"email",placeholder:"Enter your email",value:o,onChange:s=>b(s.target.value),className:"pl-10 bg-background border-input text-foreground placeholder:text-muted-foreground focus:border-ring focus:ring-ring",required:!0})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(h,{htmlFor:"password",className:"text-foreground font-medium",children:"Password"}),e.jsxs("div",{className:"relative",children:[e.jsx(G,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(x,{id:"password",type:i?"text":"password",placeholder:"Enter your password",value:d,onChange:s=>w(s.target.value),className:"pl-10 pr-10 bg-background border-input text-foreground placeholder:text-muted-foreground focus:border-ring focus:ring-ring",required:!0}),e.jsx("button",{type:"button",onClick:()=>j(!i),className:"absolute right-3 top-3 text-muted-foreground hover:text-foreground",children:i?e.jsx(J,{className:"h-4 w-4"}):e.jsx(K,{className:"h-4 w-4"})})]})]}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(f,{to:"/forgot-password",className:"text-sm text-primary hover:text-primary-hover hover:underline",children:"Forgot password?"})}),e.jsx(E,{type:"submit",className:"w-full bg-primary text-primary-foreground hover:bg-primary-hover",disabled:c,children:c?"Signing in...":"Sign In"}),e.jsxs("div",{className:"text-center",children:[e.jsx("span",{className:"text-muted-foreground",children:"Don't have an account? "}),e.jsx(f,{to:"/signup",className:"text-primary hover:text-primary-hover hover:underline font-medium",children:"Sign up"})]})]})})]})})}),e.jsx(H,{}),e.jsx(B,{open:y,onOpenChange:n,children:e.jsxs(T,{children:[e.jsxs(W,{children:[e.jsx(q,{children:"Email Not Confirmed"}),e.jsxs(M,{children:["Your email address has not been confirmed yet. Would you like us to send a new confirmation email to ",e.jsx("strong",{children:o}),"?"]})]}),e.jsxs(O,{children:[e.jsx(Y,{children:"Cancel"}),e.jsx($,{onClick:N,disabled:u,children:u?"Sending...":"Resend Confirmation Email"})]})]})})]})};export{ue 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.