PageSourceSearch

https://cinewish-web.onrender.com/assets/Register-BtW5KqHi.js

js cinewish-web.onrender.com collected 2026-10-03 11:39:39 UTC 2,692 bytes, 1 lines download raw bytes

1import{r as l,u as m,a as g,j as e,L as x,V as n}from"./index-BYNP3g4A.js";const b=()=>{const[s,t]=l.useState({username:"",email:"",password:""}),[i,o]=l.useState(!1),{registerUser:c}=m(),d=g();l.useEffect(()=>{document.title="CineWish – Register"},[]);const u=async r=>{r.preventDefault();try{o(!0);const a=await c(s);a.success?(n.success(a.message),d("/login")):n.error(a.message)}catch(a){n.error(a.message||"Something went wrong")}finally{o(!1)}};return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-gray-900 via-gray-950 to-black text-white px-4",children:e.jsxs("div",{className:"w-full max-w-md bg-gray-900 p-8 rounded-2xl shadow-2xl border border-gray-800",children:[e.jsxs("div",{className:"mb-6 text-center",children:[e.jsx("h1",{className:"text-3xl font-bold",children:"CineWish"}),e.jsx("p",{className:"text-sm text-gray-400 mt-1",children:"Create your account to track movies & shows"})]}),e.jsxs("form",{onSubmit:u,className:"flex flex-col space-y-5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm mb-1 text-gray-300",children:"Name"}),e.jsx("input",{type:"text",placeholder:"Enter your name",className:"w-full px-4 py-3 bg-gray-800 border border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-teal-500",required:!0,value:s.username,onChange:r=>t({...s,username:r.target.value})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm mb-1 text-gray-300",children:"Email"}),e.jsx("input",{type:"email",placeholder:"Enter your email",className:"w-full px-4 py-3 bg-gray-800 border border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-teal-500",required:!0,value:s.email,onChange:r=>t({...s,email:r.target.value})})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm mb-1 text-gray-300",children:"Password"}),e.jsx("input",{type:"password",placeholder:"Create a password",className:"w-full px-4 py-3 bg-gray-800 border border-gray-700 rounded-md focus:outline-none focus:ring-2 focus:ring-teal-500",required:!0,value:s.password,onChange:r=>t({...s,password:r.target.value})})]}),e.jsx("button",{type:"submit",className:"w-full flex justify-center items-center bg-teal-500 hover:bg-teal-600 text-white font-semibold py-3 rounded-md transition duration-200",children:i?e.jsx("div",{className:"h-4 w-4 border-2 rounded-full border-white border-t-[transparent] animate-spin"}):"Register"})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("p",{className:"text-sm text-gray-400",children:["Already have an account?"," ",e.jsx(x,{to:"/login",className:"text-teal-400 hover:underline",children:"Login"})]})})]})})};export{b 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.