PageSourceSearch

https://www.whizzq.app/static/js/618.3035d9e4.chunk.js

js whizzq.app collected 2026-10-02 00:45:31 UTC 4,233 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkschedmad_reactjs=self.webpackChunkschedmad_reactjs||[]).push([[618],{7618:(e,a,t)=>{t.r(a),t.d(a,{default:()=>c});var s=t(7313),l=(t(4100),t(1948)),i=(t(8282),t(6182)),r=t(3127),n=t(2453),o=t(6417);function c(){const[e,a]=(0,s.useState)(""),[t,c]=(0,s.useState)(""),[m,d]=(0,s.useState)(""),[u,p]=(0,s.useState)(""),[h,x]=(0,s.useState)(""),{userImage:b,setUserImage:g}=(0,i.K)(),[f,j]=(0,s.useState)({}),N=localStorage.getItem("userId"),v=(new Date).toISOString().split("T")[0];return(0,s.useEffect)((()=>{(async()=>{try{const e="https://api.whizzq.app/api/getProfile",t=await(0,r.Z)(e,"POST",{server_id:N},{},void 0,{suppressErrorModal:!0});a(t.data.name||""),c(t.data.email||""),p(t.data.mobile||""),d(t.data.dob||""),g(t.data.profile_pic),x("")}catch(e){console.error(e)}})()}),[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.ql,{children:(0,o.jsx)("meta",{name:"robots",content:"noindex, follow"})}),(0,o.jsxs)("div",{className:"container mt-3 d-flex justify-content-center",children:[(0,o.jsxs)("div",{className:"card p-4 mb-4",style:{maxWidth:"400px",width:"100%"},children:[(0,o.jsx)("div",{className:"d-flex justify-content-center mb-4 position-relative",children:(0,o.jsxs)("div",{className:"position-relative",children:[(0,o.jsx)("img",{src:h||b,alt:"User",className:"rounded-circle",width:"100",height:"100",style:{cursor:"pointer"},onClick:()=>document.getElementById("imageInput").click()}),(0,o.jsx)("input",{type:"file",id:"imageInput",accept:"image/*",onChange:e=>{const a=e.target.files[0],t=new FileReader;t.onloadend=()=>{x(t.result)},a&&t.readAsDataURL(a)},style:{display:"none"}}),(0,o.jsx)("div",{className:"position-absolute bg-primary text-white rounded-circle d-flex justify-content-center align-items-center",style:{width:"30px",height:"30px",right:"34px",bottom:"-9px",cursor:"pointer"},onClick:()=>document.getElementById("imageInput").click(),children:(0,o.jsx)("i",{className:"fa fa-plus"})})]})}),(0,o.jsxs)("form",{onSubmit:async a=>{if(a.preventDefault(),(()=>{const a={};return e||(a.name="Name is required"),u?/^\d{10}$/.test(u)||(a.mobileNumber="Mobile Number must be 10 digits"):a.mobileNumber="Mobile Number is required",t?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.(com|net|org|co|edu|gov|in|io|co\.in|ai)$/i.test(t)||(a.email="Invalid email domain"):a.email="Email is required",j(a),0===Object.keys(a).length})()){const a={name:e,email:t,dob:m,mobile:u,profile_pic:h||b,server_id:N};try{const e="https://api.whizzq.app/api/saveProfile",t=await(0,r.Z)(e,"POST",a);l.Am.success("Profile updated successfully!"),localStorage.setItem("userProfileImage",t.data.profile_pic),g(t.data.profile_pic),x("")}catch(s){console.error(s)}}},children:[(0,o.jsxs)("div",{className:"form-group mb-3",children:[(0,o.jsx)("label",{htmlFor:"name",className:"user-details",children:"Name"}),(0,o.jsx)("input",{type:"text",className:"form-control",id:"name",value:e,onChange:e=>a(e.target.value)}),f.name&&(0,o.jsx)("small",{className:"text-danger",children:f.name})]}),(0,o.jsxs)("div",{className:"form-group mb-3",children:[(0,o.jsx)("label",{htmlFor:"email",className:"user-details",children:"Email"}),(0,o.jsx)("input",{type:"email",className:"form-control",id:"email",value:t,onChange:e=>c(e.target.value)}),f.email&&(0,o.jsx)("small",{className:"text-danger",children:f.email})]}),(0,o.jsxs)("div",{className:"form-group mb-3",children:[(0,o.jsx)("label",{htmlFor:"dob",className:"user-details",children:"Date of Birth"}),(0,o.jsx)("input",{type:"date",className:"form-control",id:"dob",value:m,onChange:e=>d(e.target.value),max:v}),f.dob&&(0,o.jsx)("small",{className:"text-danger",children:f.dob})]}),(0,o.jsxs)("div",{className:"form-group mb-4",children:[(0,o.jsx)("label",{htmlFor:"mobileNumber",className:"user-details",children:"Mobile Number"}),(0,o.jsx)("input",{type:"text",className:"form-control",id:"mobileNumber",value:u,onChange:e=>p(e.target.value)}),f.mobileNumber&&(0,o.jsx)("small",{className:"text-danger",children:f.mobileNumber})]}),(0,o.jsx)("div",{className:"d-flex justify-content-center",children:(0,o.jsx)("button",{type:"submit",className:"btn user-update-btn",children:"Update Your Profile"})})]})]}),(0,o.jsx)(l.Ix,{})]})]})}},4100:()=>{},8282:()=>{}}]);

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.