PageSourceSearch

https://auf.tv/assets/set-phone-BL0KgEN_.js

js auf.tv collected 2026-10-07 18:59:39 UTC 1,838 bytes, 1 lines download raw bytes

1import{l as u,j as a,v as c}from"./index-41K_R4Vg.js";import{e as o,k as S}from"./vendor-react-DAZFsden.js";import{A as w}from"./AuthCard-B30m_aj5.js";import{F as f}from"./FormInput-JBIvnzDS.js";import{F as N}from"./FormButton-C0xTn2H6.js";import{F as P}from"./FormError-D29iYOvG.js";import"./vendor-query-CCOV1duv.js";const C="https://api.auf.tv/api/v2.7/user/data",E="https://api.auf.tv/api/v2.7/user";function I(){const[r,h]=o.useState(""),[l,m]=o.useState(""),[p,n]=o.useState(""),[d,i]=o.useState(!1),g=S(),[s,v]=o.useState({}),[b,j]=o.useState(!0);o.useEffect(()=>{const t=new AbortController;return fetch(E,{method:"GET",headers:{"Authentication-Token":u()},signal:t.signal}).then(e=>e.json()).then(e=>v(e.user)).catch(e=>{e.name!=="AbortError"&&n("No se pudieron cargar tus datos. Recargá la página.")}).finally(()=>j(!1)),()=>t.abort()},[]);const x=async t=>{if(t.preventDefault(),r!==l){n("Los teléfonos ingresados no coinciden.");return}i(!0);try{const e=await fetch(C,{method:"POST",body:JSON.stringify({name:s.name,last_name:s.last_name,dni:s.dni,phone:r,team:s.team}),headers:{"Content-Type":"application/json","Authentication-Token":u()}}),y=await e.json();e.status===200?g("/browse"):(n(y.message),i(!1))}catch(e){n(e.message),i(!1)}};return a.jsx(w,{title:"Cambiá tu teléfono",backLink:"/my-account",children:a.jsxs("form",{className:"auth-form",onSubmit:x,children:[a.jsx(f,{id:"set-phone-new",label:"Nuevo teléfono",type:"tel",placeholder:"Nuevo teléfono",value:r,onChange:t=>h(t.target.value),required:!0,icon:c}),a.jsx(f,{id:"set-phone-repeat",label:"Repetir nuevo teléfono",type:"tel",placeholder:"Repetir nuevo teléfono",value:l,onChange:t=>m(t.target.value),required:!0,icon:c}),a.jsx(P,{message:p}),a.jsx(N,{loading:d,loadingText:"Guardando...",disabled:b,children:"Cambiar"})]})})}export{I 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.