PageSourceSearch

https://driftgolf-qa.netlify.app/assets/LoginPage-f7a989ee.js

js driftgolf-qa.netlify.app collected 2026-10-03 10:40:08 UTC 2,539 bytes, 1 lines download raw bytes

1import{u as x,r as a,a as t,j as e,d as w}from"./index-4ce00ee7.js";import{d as r}from"./index-e629a575.js";import{t as m}from"./index-51f3a61d.js";import{w as p}from"./warning-ed9d4d8a.js";const h=()=>{const{isAuthenticated:l,logIn:d}=x(),[i,o]=a.useState("");a.useEffect(()=>{l&&t.navigate(t.routes.dashboard())},[l]);const n=a.useRef();a.useEffect(()=>{n.current.focus()},[]);const c=async u=>{const s=await d({...u});s.message?o(s.message):s.error?o(s.error):m.toast.success("Welcome back!")};return e.jsxs(e.Fragment,{children:[e.jsx(w.MetaTags,{title:"Login"}),e.jsx("main",{className:"max-w-full w-[32rem] mx-auto mt-12",children:e.jsxs("div",{className:"bg-white p-8 rounded-lg space-y-5",children:[e.jsx("h2",{className:"text-2xl text-dark font-bold",children:"Login"}),e.jsx(m.Toaster,{toastOptions:{className:"rw-toast",duration:6e3}}),e.jsxs(r.Form,{onSubmit:c,className:"rw-form-wrapper space-y-5",children:[i&&e.jsxs("div",{className:"flex items-center rw-field-error bg-pink-100 p-2",children:[e.jsx("img",{src:p,alt:"warning"}),e.jsx("span",{className:"ml-1 mt-0.5",children:i})]}),e.jsxs("div",{children:[e.jsx(r.Label,{name:"username",className:"text-gray-900",errorClassName:"rw-label rw-label-error",children:"Email"}),e.jsx(r.TextField,{name:"username",className:"rw-input",errorClassName:"rw-input rw-input-error",ref:n,validation:{required:{value:!0,message:"*Required"}}}),e.jsx(r.FieldError,{name:"username",className:"rw-field-error"})]}),e.jsxs("div",{children:[e.jsx(r.Label,{name:"password",className:"text-gray-900",errorClassName:"rw-label rw-label-error",children:"Password"}),e.jsx(r.PasswordField,{name:"password",className:"rw-input",errorClassName:"rw-input rw-input-error",autoComplete:"current-password",validation:{required:{value:!0,message:"*Required"}}}),e.jsx(r.FieldError,{name:"password",className:"rw-field-error"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("div",{children:[e.jsx(r.CheckboxField,{name:"rememberMe",errorClassName:"rw-input rw-input-error inline-block mt-0",validation:{required:{value:!1}}}),e.jsx(r.Label,{name:"rememberMe",className:"text-gray-900 inline-block ml-2",errorClassName:"rw-label rw-label-error inline-block mt-0 ml-2",children:"Remember me"})]}),e.jsx(t.Link,{to:t.routes.forgotPassword(),className:"text-primary-500 hover:text-orange-600 underline",children:"Forgot Password?"})]}),e.jsx(r.Submit,{className:"w-full bg-primary-500 hover:bg-orange-600 text-white rounded-lg p-2.5",children:"Log In"})]})]})})]})};export{h 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.