PageSourceSearch

https://rubpage.com/assets/FavoritesPage-B-cT8vnX.js

js rubpage.com collected 2026-09-25 06:31:05 UTC 3,012 bytes, 1 lines download raw bytes

1import{j as t}from"./vendor-query-nkyHp8gL.js";import{D as c}from"./DashboardLayout-BQArLa03.js";import{am as d,l as x,n as p,H as a,x as o,B as g}from"./index-BG1hbjB_.js";import{L as l}from"./vendor-react-BNT0nzvx.js";import{B as u}from"./badge-Cu86KUYW.js";import{c as h}from"./use-role-guard-DUkhNAMS.js";import{f as j}from"./formatDistanceToNow-CKXtw6Zh.js";import"./input-otp-BmijqesX.js";import"./shield-check-BjMYzFta.js";import"./shield-D2cqmhBs.js";import"./chevron-right-Bjkf53ML.js";import"./eye-CbHUV7pU.js";import"./mail-check-D7o3uZkb.js";import"./users-qXgsJLD-.js";import"./newspaper-CxHmHB1y.js";import"./crown-CsNa2Jyx.js";import"./target-DCR3Hpgj.js";import"./list-CCtzf_Gh.js";import"./flag-BAn4BLiN.js";import"./vendor-ui-DPPUfW-O.js";import"./vendor-charts-B_MCcq71.js";import"./vendor-supabase-BRDBMtg7.js";import"./en-US-Dli8qwSn.js";import"./endOfMonth-DyeqHD7u.js";const N=()=>{const{data:s,isLoading:m}=d(),n=x();return t.jsxs(c,{children:[t.jsx("h1",{className:"text-xl font-medium text-foreground mb-6",children:"Saved Listings"}),m?t.jsx("div",{className:"flex justify-center py-16",children:t.jsx(p,{className:"w-5 h-5 animate-spin text-muted-foreground"})}):s?.length?t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:s.map(e=>{const i=e.listing?.expires_at&&new Date(e.listing.expires_at)<new Date,r=e.listing?.activated&&e.listing?.published&&!i;return t.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[t.jsxs(l,{to:`/profile/${e.listing?.slug}`,className:"relative block",children:[t.jsx("img",{src:e.listing?.images?.[0]??"/placeholder.svg",alt:`${o(e.listing?.title??"Listing")} body rub listing`,className:`w-full aspect-[4/3] object-cover ${r?"":"opacity-50 grayscale"}`}),!r&&t.jsx(u,{variant:"secondary",className:"absolute top-2 left-2 text-[10px]",children:i?"Expired":"Inactive"})]}),t.jsxs("div",{className:"p-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx(l,{to:`/profile/${e.listing?.slug}`,className:"text-sm font-medium text-foreground truncate block hover:text-primary",children:o(e.listing?.title??"")}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:[e.listing?.city?.name,e.listing?.city?.state?`, ${e.listing.city.state}`:""]})]}),t.jsx(g,{variant:"ghost",size:"sm",onClick:()=>n.mutate(e.listing?.id),className:"text-destructive",children:t.jsx(a,{className:"w-4 h-4 fill-current"})})]}),t.jsxs("p",{className:"text-[11px] text-muted-foreground mt-1.5",children:["Saved ",j(new Date(e.created_at),{addSuffix:!0})]})]})]},e.id)})}):t.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[t.jsx(a,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),t.jsx("p",{className:"text-sm",children:"No saved listings yet"}),t.jsx("p",{className:"text-xs mt-1",children:"Browse listings and tap the heart to save them here."})]})]})},G=h(N);export{G 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.