PageSourceSearch

https://musickcreekfalls.com/assets/ResetPassword-CGYc9L99.js

js musickcreekfalls.com collected 2026-10-07 09:51:08 UTC 3,124 bytes, 1 lines download raw bytes

1import{k as r,p as h,j as t}from"./react-vendor-CmuEGgtt.js";import{R as y,M as u}from"./site-CMMCmqVg.js";import"./x-CAppInM7.js";import"./radix-26y85DbF.js";import"./motion-DxYJUoZ7.js";function E(){y({title:"Reset password — Musick Creek Falls",description:"Set a new password for your Musick Creek Falls admin account.",canonical:"https://musickcreekfalls.com/reset-password"}),r.useEffect(()=>{let e=document.head.querySelector('meta[name="robots"]');e||(e=document.createElement("meta"),e.setAttribute("name","robots"),document.head.appendChild(e)),e.setAttribute("content","noindex,nofollow")},[]);const b=h(),[a,i]=r.useState(!1),[o,x]=r.useState(""),[l,f]=r.useState(""),[c,m]=r.useState(!1),[p,d]=r.useState(null),[n,g]=r.useState(!1);r.useEffect(()=>{const{data:e}=u.auth.onAuthStateChange(s=>{(s==="PASSWORD_RECOVERY"||s==="SIGNED_IN")&&i(!0)});return u.auth.getSession().then(({data:s})=>{s.session&&i(!0)}),()=>e.subscription.unsubscribe()},[]);const w=async e=>{if(e.preventDefault(),d(null),o.length<8){d("Password must be at least 8 characters.");return}if(o!==l){d("Passwords don't match.");return}m(!0);const{error:s}=await u.auth.updateUser({password:o});if(m(!1),s){d(s.message);return}g(!0),setTimeout(()=>b("/admin/performance",{replace:!0}),1200)};return t.jsx("main",{className:"min-h-screen bg-background text-foreground",children:t.jsx("div",{className:"mx-auto flex min-h-screen max-w-md items-center px-6",children:t.jsxs("form",{onSubmit:w,className:"w-full rounded-lg border border-border bg-card/40 p-6",children:[t.jsx("h1",{className:"font-display text-2xl text-foreground",children:"Set a new password"}),t.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:a?"Enter a new password for your admin account.":"Waiting for recovery link… open this page from the reset email."}),t.jsx("label",{className:"mt-6 block text-xs uppercase tracking-wide text-muted-foreground",children:"New password"}),t.jsx("input",{type:"password",required:!0,autoComplete:"new-password",value:o,onChange:e=>x(e.target.value),disabled:!a||n,className:"mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground disabled:opacity-50"}),t.jsx("label",{className:"mt-4 block text-xs uppercase tracking-wide text-muted-foreground",children:"Confirm password"}),t.jsx("input",{type:"password",required:!0,autoComplete:"new-password",value:l,onChange:e=>f(e.target.value),disabled:!a||n,className:"mt-1 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground disabled:opacity-50"}),p&&t.jsx("p",{className:"mt-3 rounded-md border border-rose-500/30 bg-rose-500/10 p-2 text-xs text-rose-300",children:p}),n&&t.jsx("p",{className:"mt-3 rounded-md border border-emerald-500/30 bg-emerald-500/10 p-2 text-xs text-emerald-300",children:"Password updated. Redirecting…"}),t.jsx("button",{type:"submit",disabled:!a||c||n,className:"mt-6 w-full rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition hover:opacity-90 disabled:opacity-50",children:c?"Updating…":"Update password"})]})})})}export{E 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.