PageSourceSearch

https://www.agoraarchitects.co.uk/assets/feedback-xO8x9AE6.js

js agoraarchitects.co.uk collected 2026-10-07 17:37:35 UTC 6,349 bytes, 1 lines download raw bytes

1import{r as n,j as e}from"./react-vendor-DXWtfMZp.js";import{aa as y,ab as j}from"./tanstack-CQ6rBF0J.js";import"./ui-vendor-DL8nEvqa.js";import"./motion-utils-CiXnTxl2.js";const w=y({method:"POST"}).handler(j("8cffebe7f8c2b6c04154aa5eec11d147f1ba6b770d45b4082f1896b15f52b79a")),m=[{v:"1",label:"Not at all"},{v:"2",label:"A little"},{v:"3",label:"Somewhat"},{v:"4",label:"Mostly"},{v:"5",label:"Very much"}],d=[{name:"q1",text:"1. Was the range of costs we gave you easy to understand? Did the “Why is my estimate range this wide?” section make sense, and did the range feel about right for a quick first look at your project?",short:"Was the range of costs easy to understand?"},{name:"q2",text:"2. Did the home energy package make sense to you? Was it clear what is included and what isn’t, and would you have known what you’d be getting for that cost?",short:"Did the home energy package make sense?"},{name:"q3",text:"3. Did you find the tool easy to use? Was it straightforward to fill in, and did you find it easy to understand your results?",short:"Did you find the tool easy to use?"}];function A(){const[r,h]=n.useState({}),[i,u]=n.useState(""),[l,o]=n.useState("idle"),[c,x]=n.useState(null),b=(t,s)=>h(a=>({...a,[t]:s})),p=async t=>{t.preventDefault();const s=d.filter(a=>!r[a.name]);if(s.length>0){x("Please answer "+s.map(a=>`${a.name.replace("q","Question ")}.`).join(" ")+" You can leave the last question about 'anything else' blank if you like.");return}x(null),o("loading");try{(await w({data:{q1:r.q1,q2:r.q2,q3:r.q3,comments:i}})).ok?o("success"):o("error")}catch{o("error")}},f=d.map(t=>{const s=r[t.name]??"—",a=m.find(g=>g.v===s)?.label??s;return e.jsxs("div",{className:"mb-2.5",children:[e.jsx("div",{className:"font-semibold text-[#2d313a]",children:t.short}),e.jsxs("div",{className:"text-[#7d6635]",children:[s," — ",a]})]},t.name)});return e.jsxs("div",{className:"min-h-dvh bg-[#f0f0f5]",children:[e.jsx("section",{className:"relative overflow-hidden bg-[#2d313a] pt-28 pb-10 md:pt-36 md:pb-12",children:e.jsxs("div",{className:"mx-auto max-w-3xl px-5",children:[e.jsx("p",{className:"text-[13px] font-semibold uppercase tracking-[0.16em] text-[#bea073]",children:"Beta feedback"}),e.jsx("h1",{className:"mt-2 text-3xl font-bold tracking-tight text-[#f0f0f5] md:text-4xl",children:"Help us improve the tools"}),e.jsx("p",{className:"mt-3 max-w-2xl text-base leading-relaxed text-[#c9ccd4]",children:"Share your feedback on the AGORA Build Cost Tools to help us improve them."}),e.jsx("a",{href:"/insights/tools/build-cost-estimator",className:"mt-5 inline-flex items-center gap-1.5 text-[13px] font-semibold text-[#bea073] hover:text-white",children:"← Back to the build cost estimator"})]})}),e.jsx("main",{className:"mx-auto max-w-2xl px-5 pb-20 pt-8",children:l==="success"?e.jsxs("div",{className:"mt-6 rounded-3xl border border-[#7ab77a] bg-[#e8f2e8] p-8 text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-[#2d313a]",children:"Thanks for your feedback!"}),e.jsx("p",{className:"mt-1 text-[15px] text-[#3d6b3a]",children:"Your responses have been submitted. Here's a summary of what you sent:"}),e.jsx("div",{className:"mt-4 rounded-2xl border border-[#e3e3ea] bg-white p-5 text-left text-[14px]",children:f}),e.jsx("p",{className:"mt-4 text-[13px] text-[#636771]",children:"Thank you for helping us improve the AGORA Build Cost Tools."})]}):l==="error"?e.jsxs("div",{className:"mt-6 rounded-3xl border border-[#d9534f] bg-[#fdf0f0] p-8 text-center",children:[e.jsx("p",{className:"text-xl font-bold text-[#2d313a]",children:"Something went wrong"}),e.jsx("p",{className:"mt-1 text-[15px] text-[#a02a26]",children:"We couldn't submit your feedback just now. This is usually a temporary network or server issue — your answers are still here, so please try again."}),e.jsx("button",{type:"button",onClick:()=>o("idle"),className:"mt-5 w-full rounded-full bg-[#2d313a] px-6 py-3 text-sm font-bold text-white transition-colors hover:bg-[#7d6635]",children:"Try again"}),e.jsx("p",{className:"mt-3 text-[12px] text-[#636771]",children:"Your answers have been kept — nothing is lost."})]}):e.jsxs("form",{onSubmit:p,noValidate:!0,className:"mt-6",children:[e.jsxs("p",{className:"text-[13px] text-[#636771]",children:["For each question, pick the number that best fits. ",e.jsx("strong",{children:"1 = Not at all"})," · ",e.jsx("strong",{children:"5 = Very much"})]}),d.map(t=>e.jsxs("fieldset",{className:"mt-4 rounded-2xl border border-[#e3e3ea] bg-white p-5",children:[e.jsx("legend",{className:"px-1 text-[15px] font-semibold text-[#2d313a]",children:t.text}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:m.map(s=>e.jsxs("label",{className:"flex min-w-[52px] flex-1 cursor-pointer flex-col items-center rounded-xl border border-[#e3e3ea] px-2 py-2 text-center text-[13px] transition-colors hover:border-[#7d6635]",children:[e.jsx("input",{type:"radio",name:t.name,value:s.v,onChange:()=>b(t.name,s.v),className:"mb-1 h-4 w-4"}),e.jsx("span",{className:"font-semibold text-[#2d313a]",children:s.v}),e.jsx("span",{className:"text-[#636771]",children:s.label})]},s.v))})]},t.name)),e.jsxs("fieldset",{className:"mt-4 rounded-2xl border border-[#e3e3ea] bg-white p-5",children:[e.jsx("legend",{className:"px-1 text-[15px] font-semibold text-[#2d313a]",children:"Anything else you'd like us to know?"}),e.jsx("textarea",{rows:3,value:i,onChange:t=>u(t.target.value),placeholder:"Optional — share any thoughts here",className:"mt-3 w-full rounded-xl border border-[#e3e3ea] p-3 text-[14px] text-[#2d313a]"})]}),c&&e.jsx("p",{role:"alert",className:"mt-4 rounded-xl border border-[#d9534f] bg-[#fdf0f0] px-4 py-3 text-[14px] text-[#a02a26]",children:c}),e.jsx("button",{type:"submit",disabled:l==="loading",className:"mt-6 flex w-full items-center justify-center gap-2 rounded-full bg-[#7d6635] px-6 py-3.5 text-sm font-bold text-white transition-colors hover:bg-[#2d313a] disabled:cursor-not-allowed disabled:opacity-60",children:l==="loading"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"h-4 w-4 animate-spin rounded-full border-2 border-white/40 border-t-white"}),"Submitting…"]}):"Submit feedback"}),e.jsx("p",{className:"mt-3 text-center text-[12px] text-[#636771]",children:"Your responses help us improve the tools."})]})})]})}export{A as component};

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.