PageSourceSearch

https://www.charitywater.org/vite/assets/ProfilePhoto-BSgDv50I.js

js charitywater.org collected 2026-09-24 06:54:47 UTC 2,492 bytes, 2 lines download raw bytes

1import{aB as a,aP as e,aR as u}from"./store-DUosIV5A.js";import h from"./FileUpload-CecIX0_R.js";import f from"./SkipStepLink-CuckaMT0.js";import{c as x}from"./index-B_D4uYdN.js";import{o as g,a as r,u as b}from"./application-CegkUz9G.js";import{a as v}from"./index-CzF8G1rP.js";const k=g(({trackSuccessfulUpdate:n})=>{const i=r.useRef(null),t=b(()=>({photoOrigin:a.campaign.avatarUrl?"existing-avatar":"default-avatar",submitButtonDisabled:!1,showUploadInput:!1})),s=v();r.useEffect(()=>{a.campaign.avatarUrl&&s(a.campaign.nextStepPath)},[a.campaign.avatarUrl]);const l=o=>{o.preventDefault(),t.submitButtonDisabled=!0,u(()=>{const d=new FormData(o.target);a.campaign.updateUser(d,p),s(a.campaign.nextStepPath)})},c=o=>{t.photoOrigin=o},p=()=>{n({photo_source:t.photoOrigin},"profile-photo")},m=o=>{t.showUploadInput=o};return e.jsxs(e.Fragment,{children:[e.jsx("h1",{className:"h35 font-heading font-normal border-none text-cw-black bg-none m-0 py-3",children:"Make it your own"}),e.jsx("p",{className:"p40  md-w-4/5",children:"First, add your profile photo to make it quick and easy for people to know they’re in the right place."}),e.jsxs("form",{className:"md-w-4/5 lg-w-full",onSubmit:l,ref:i,children:[e.jsx("input",{name:"_method",type:"hidden",value:"patch"}),e.jsx("input",{name:"authenticity_token",type:"hidden",value:a.campaign.authToken}),e.jsx("div",{className:"border border-solid border-grey-30 rounded p-2 my-2 flex flex-col items-center relative bg-cw-white z-over-content",children:e.jsx("div",{className:"photo",children:e.jsxs("div",{className:"uploader",children:[e.jsxs("div",{className:x("mt-0 pl-2",{hidden:!t.showUploadInput}),children:[e.jsx("h2",{className:"font-heading p20",children:a.campaign.userName}),e.jsx("p",{className:"pt-1",style:{fontSize:"14px"},children:"For best results, use a square image"})]}),e.jsx(h,{attachment:"avatar",currentUrl:a.campaign.avatarUrl,hasPlaceholderImg:!0,model:"user",placeholderClasses:"rounded-full flex flex-col items-center justify-center",showUploadInput:m,size:80,updatePhotoOrigin:c})]})})}),e.jsx("div",{className:"flex flex-row items-center pt-3",children:e.jsxs("button",{className:"button button--cw-yellow m-0 text-cw-black",disabled:t.submitButtonDisabled,type:"submit",children:[t.submitButtonDisabled&&e.jsx("i",{className:"cw-icon-loop cw-icon-spin mr-1"}),"Continue"]})}),e.jsx(f,{navigate:s,path:a.campaign.nextStepPath})]})]})});export{k as default};
2//# sourceMappingURL=ProfilePhoto-BSgDv50I.js.map

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.