PageSourceSearch

https://rentfix.ai/assets/RraAcknowledgePage-DTC223of.js

js rentfix.ai collected 2026-10-05 12:30:26 UTC 4,143 bytes, 1 lines download raw bytes

1import{j as e,d as m,a7 as x,h as c,y as h,H as g,a3 as u}from"./index-CDqgQ74g.js";import{i as f,u as y,r as n}from"./vendor-BO8c4Gey.js";import"./supabase-CFvVQE3m.js";import"./i18n-BBLh2y9V.js";import"./forms-CkyW7xJo.js";import"./date-cwXK75ha.js";function A(){const{token:a}=f(),o=y(),[s,r]=n.useState("loading"),[l,d]=n.useState(null);return n.useEffect(()=>{(async()=>{if(!a){r("error");return}try{const{data:t,error:i}=await u.rpc("acknowledge_rra_info_sheet",{p_token:a});if(i){console.error("Acknowledgement error:",i),r("error");return}if(!(t!=null&&t.success)){r("error");return}t.already_acknowledged?(r("already"),d(t.acknowledged_at||null)):r("success")}catch(t){console.error("Acknowledgement exception:",t),r("error")}})()},[a]),e.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"max-w-md w-full",children:[e.jsxs("div",{className:"bg-white rounded-2xl shadow-lg overflow-hidden",children:[e.jsxs("div",{className:"bg-gradient-to-br from-brand-midnight via-brand-navy to-brand-midnight px-8 py-8 text-center",children:[e.jsx("div",{className:"inline-flex items-center justify-center bg-white/20 rounded-2xl p-4 mb-4",children:e.jsx(m,{className:"w-10 h-10 text-white"})}),e.jsx("h1",{className:"text-2xl font-bold text-white",children:"Renters' Rights Act 2025"}),e.jsx("p",{className:"text-gray-300 text-sm mt-2",children:"Information Sheet Acknowledgement"})]}),e.jsxs("div",{className:"px-8 py-8",children:[s==="loading"&&e.jsxs("div",{className:"text-center",children:[e.jsx(x,{className:"w-10 h-10 text-primary-600 animate-spin mx-auto mb-4"}),e.jsx("p",{className:"text-gray-600",children:"Processing your acknowledgement..."})]}),s==="success"&&e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"inline-flex items-center justify-center bg-green-100 rounded-full p-4 mb-4",children:e.jsx(c,{className:"w-10 h-10 text-green-600"})}),e.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-2",children:"Thank You"}),e.jsx("p",{className:"text-gray-600 mb-6",children:"Your acknowledgement has been recorded. Your landlord has been notified that you have received the Renters' Rights Act Information Sheet."}),e.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:["Please keep your copy of the Information Sheet for your records. You can learn more about your new rights on the"," ",e.jsx("a",{href:"https://www.gov.uk/private-renting",target:"_blank",rel:"noopener noreferrer",className:"text-primary-600 hover:underline",children:"GOV.UK private renting pages"}),"."]})]}),s==="already"&&e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"inline-flex items-center justify-center bg-blue-100 rounded-full p-4 mb-4",children:e.jsx(c,{className:"w-10 h-10 text-blue-600"})}),e.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-2",children:"Already Confirmed"}),e.jsxs("p",{className:"text-gray-600 mb-6",children:["You have already acknowledged receipt of the Renters' Rights Act Information Sheet",l&&e.jsxs(e.Fragment,{children:[" on ",e.jsx("strong",{children:new Date(l).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})})]}),"."]})]}),s==="error"&&e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"inline-flex items-center justify-center bg-red-100 rounded-full p-4 mb-4",children:e.jsx(h,{className:"w-10 h-10 text-red-600"})}),e.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-2",children:"Invalid Link"}),e.jsx("p",{className:"text-gray-600 mb-6",children:"This acknowledgement link is not valid. It may have been used already or the link may be incorrect. Please contact your landlord if you believe this is an error."})]}),e.jsxs("button",{onClick:()=>o("/"),className:"w-full flex items-center justify-center gap-2 px-4 py-3 bg-gray-100 text-gray-700 font-medium rounded-lg hover:bg-gray-200 transition-colors",children:[e.jsx(g,{className:"w-4 h-4"}),"Go to Homepage"]})]})]}),e.jsx("p",{className:"text-center text-xs text-gray-400 mt-6",children:"Rent Fix Legals -- Renters' Rights Act 2025 Compliance"})]})})}export{A 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.