PageSourceSearch

https://buil-fogwill.com/assets/MyAccountPage-Dsv32fhb.js

js buil-fogwill.com collected 2026-10-07 19:56:37 UTC 2,828 bytes, 1 lines download raw bytes

1import{aR as f,b as N,k as v,i as y,a as b,r as w,ae as C,af as L,j as e,v as m,L as x,H as P,au as A,B as u,aS as F,C as H,c as O,d as k,aQ as h,f as E,a0 as T,a1 as q,x as z,A as B}from"./index-DYzDqWEM.js";function S(){const{user:s,webProfile:l,isWebUser:M,loading:n,favorites:a}=f(),{signOut:p,isAgent:d}=N(),{localizedPath:t}=v(),{t:r,i18n:Q}=y(),i=b();w.useEffect(()=>{!n&&!s&&i(t("/login"),{replace:!0,state:{from:t("/mi-cuenta")}}),!n&&d&&i("/admin",{replace:!0})},[s,n,d,i,t]);const{data:o=[],isLoading:j}=C({queryKey:["favorite-properties",a],queryFn:async()=>{if(a.length===0)return[];const{data:c}=await L.from("public_properties").select("*").in("id",a);return c||[]},enabled:a.length>0}),g=async()=>{await p(),i(t("/"))};return n?e.jsxs(e.Fragment,{children:[e.jsx(m,{}),e.jsx("div",{className:"min-h-screen pt-24 flex items-center justify-center",children:e.jsx(x,{className:"h-8 w-8 animate-spin text-primary"})})]}):s?e.jsxs(e.Fragment,{children:[e.jsxs(P,{children:[e.jsx("title",{children:r("account.pageTitle")}),e.jsx("meta",{name:"robots",content:"noindex, nofollow"})]}),e.jsx(m,{}),e.jsx("main",{className:"min-h-screen pt-24 pb-16",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between gap-4 mb-8",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"bg-primary/10 rounded-full p-3",children:e.jsx(A,{className:"h-8 w-8 text-primary"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:(l==null?void 0:l.name)||s.email}),e.jsx("p",{className:"text-muted-foreground text-sm",children:s.email})]})]}),e.jsxs(u,{variant:"outline",onClick:g,className:"gap-2",children:[e.jsx(F,{className:"h-4 w-4"}),r("account.signOut")]})]}
1),e.jsxs(H,{className:"border-0 shadow-card",children:[e.jsx(O,{children:e.jsxs(k,{className:"flex items-center gap-2",children:[e.jsx(h,{className:"h-5 w-5 text-primary"}),r("account.favorites"),e.jsxs("span",{className:"text-muted-foreground font-normal text-base",children:["(",a.length,")"]})]})}),e.jsx(E,{children:j?e.jsx("div",{className:"flex justify-center py-12",children:e.jsx(x,{className:"h-6 w-6 animate-spin text-primary"})}):o.length===0?e.jsxs("div",{className:"text-center py-12 space-y-4",children:[e.jsx(h,{className:"h-12 w-12 text-muted-foreground/30 mx-auto"}),e.jsx("p",{className:"text-muted-foreground",children:r("account.noFavorites")}),e.jsx(T,{to:t("/propiedades"),children:e.jsxs(u,{className:"gradient-ocean gap-2",children:[e.jsx(q,{className:"h-4 w-4"}),r("account.browseProperties")]})})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:o.map(c=>e.jsx(z,{property:c},c.id))})})]})]})}),e.jsx(B,{})]}):null}export{S 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.