PageSourceSearch

https://demotelemed.lovable.app/assets/Account-4CynbUoi.js

js demotelemed.lovable.app collected 2026-10-03 03:25:55 UTC 3,448 bytes, 1 lines download raw bytes

1import{E as w,r as c,j as s,v as p,q as t}from"./index-42OYDF60.js";import{B as u}from"./button-EfpS49lo.js";import{I as i}from"./input-D0IjS33j.js";import{L as o}from"./label-BNvpn1fK.js";import{L as g}from"./loader-circle-C9c4MVet.js";import{S as j}from"./save-D7r0WXgf.js";const P=()=>{const{user:e}=w(),[r,f]=c.useState((e==null?void 0:e.email)??""),[l,m]=c.useState(""),[x,h]=c.useState(""),[d,n]=c.useState(!1),N=async()=>{if(!r||r===(e==null?void 0:e.email))return;n(!0);const{error:a}=await p.auth.updateUser({email:r});n(!1),a?t.error(a.message):t.success("ইমেইল আপডেট রিকোয়েস্ট পাঠানো হয়েছে — কনফার্মেশন লিংক পরীক্ষা করুন")},v=async()=>{if(l.length<8){t.error("পাসওয়ার্ড কমপক্ষে ৮ অক্ষর");return}if(l!==x){t.error("পাসওয়ার্ড মিলছে না");return}n(!0);const{error:a}=await p.auth.updateUser({password:l});n(!1),a?t.error(a.message):(t.success("পাসওয়ার্ড আপডেট হয়েছে"),m(""),h(""))};return s.jsxs("div",{className:"space-y-5 max-w-2xl",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-extrabold tracking-tight",children:"আমার অ্যাকাউন্ট"}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"ইমেইল ও পাসওয়ার্ড পরিবর্তন"})]}),s.jsxs("div",{className:"rounded-2xl glass-card p-5 space-y-3",children:[s.jsx("h2",{className:"text-lg font-bold",children:"ইমেইল পরিবর্তন"}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(o,{children:"ইমেইল"}),s.jsx(i,{type:"email",value:r,onChange:a=>f(a.target.value)})]}),s.jsxs(u,{onClick:N,disabled:d||r===(e==null?void 0:e.email),className:"gradient-primary text-primary-foreground",children:[d?s.jsx(g,{className:"h-4 w-4 animate-spin"}):s.jsx(j,{className:"h-4 w-4"})," ইমেইল আপডেট"]})]}),s.jsxs("div",{className:"rounded-2xl glass-card p-5 space-y-3",children:[s.jsx("h2",{className:"text-lg font-bold",children:"পাসওয়ার্ড পরিবর্তন"}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(o,{children:"নতুন পাসওয়ার্ড"}),s.jsx(i,{type:"password",value:l,onChange:a=>m(a.target.value),minLength:8})]}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(o,{children:"কনফার্ম পাসওয়ার্ড"}),s.jsx(i,{type:"password",value:x,onChange:a=>h(a.target.value),minLength:8})]}),s.jsxs(u,{onClick:v,disabled:d||!l,className:"gradient-primary text-primary-foreground",children:[d?s.jsx(g,{className:"h-4 w-4 animate-spin"}):s.jsx(j,{className:"h-4 w-4"})," পাসওয়ার্ড আপডেট"]})]}),s.jsxs("div",{className:"rounded-2xl glass-card p-5 space-y-2",children:[s.jsx("h2",{className:"text-lg font-bold text-muted-foreground",children:"তথ্য"}),s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"User ID:"})," ",s.jsx("code",{className:"text-xs",children:e==null?void 0:e.id})]}),s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-muted-foreground",children:"যোগদান:"})," ",(e==null?void 0:e.created_at)&&new Date(e.created_at).toLocaleString()]})]})]})};export{P 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.