PageSourceSearch

https://jobsite-exchange.netlify.app/assets/ListingDetailPage-CwW65cS1.js

js jobsite-exchange.netlify.app collected 2026-10-03 10:56:40 UTC 3,465 bytes, 1 lines download raw bytes

1import{g as u,i as g,a as f,s as b,p as x,b as m,u as j,c as L,l as y,d as v,t as N,j as t}from"./index-DGRgO-qd.js";import{r as c,i as D,L as d}from"./vendor-CcMWqYlm.js";import{L as $}from"./ListingDetailView-Rr2Hc7xt.js";import"./leaflet-BYsLm_qT.js";import"./AddressAutocomplete-BG7GVoj6.js";import"./accountActivity-BOqMMOAo.js";function w(n){const[s,r]=c.useState(()=>{if(!(n!=null&&n.trim()))return{status:"not-found"};const e=u(n);return e&&!e.deletedAt?{status:"ready",listing:e}:g()?{status:"loading"}:{status:"not-found"}});return c.useEffect(()=>{if(!(n!=null&&n.trim())){r({status:"not-found"});return}const e=()=>{const a=u(n);return a&&!a.deletedAt?a:void 0},i=e();if(i){r({status:"ready",listing:i});return}if(!g()){r({status:"not-found"});return}let o=!1;r({status:"loading"}),f(n).then(a=>{o||(a&&!a.deletedAt?r({status:"ready",listing:a}):r({status:"not-found"}))});const l=b(()=>{const a=e();a&&r({status:"ready",listing:a})});return()=>{o=!0,l()}},[n]),s}function h({title:n,children:s}){return t.jsxs("div",{className:"post-page board-page listing-detail-page",children:[t.jsx("header",{className:"post-hero post-band board-page-dark-hero listing-detail-hero listing-detail-hero--compact",children:t.jsxs("div",{className:"post-container post-hero-inner listing-detail-hero-inner",children:[t.jsx("nav",{className:"listing-detail-hero-nav","aria-label":"Listing navigation",children:t.jsx(d,{to:"/board",className:"listing-detail-hero-pill",children:"← Back to Dirt Board"})}),t.jsx("div",{className:"page-hero-block",children:t.jsx("h1",{className:"listing-detail-hero-title",children:n})})]})}),t.jsx("div",{className:"post-container board-shell listing-detail-shell",children:t.jsx("div",{className:"board-glow-panel listing-detail-panel",children:t.jsx("div",{className:"board-glow-panel__inner listing-detail-panel__inner listing-detail-state",children:s})})})]})}function S(){return t.jsx(h,{title:"Loading listing…",children:t.jsx("p",{role:"status",children:"Fetching listing details…"})})}function B(){return t.jsx(h,{title:"Listing not found",children:t.jsxs("p",{children:["This listing may have been removed."," ",t.jsx(d,{to:"/board",children:"Browse the Dirt Board"})," or"," ",t.jsx(d,{to:"/browse",children:"open the map"}),"."]})})}function C(){const{id:n}=D(),s=w(n),r=c.useMemo(()=>{var e;if(s.status==="ready"){const i=x(s.listing),o=[i.city,i.state].filter(Boolean).join(", "),l=m(s.listing),a=o?`${l} - ${o}`:l,p=(e=i.description)!=null&&e.trim()?i.description.trim():`${i.type==="export"?"Available":"Wanted"}: ${i.category}${i.quantity?` (${i.quantity}${i.unit?" "+i.unit:""})`:""}${o?` near ${o}`:""}.`;return{title:a,description:p,image:i.photoUrl??void 0,type:"article",canonical:`https://jobsiteexchange.com/listings/${i.id}`}}return s.status==="loading"?{title:"Loading listing…",description:"Fetching listing details from Jobsite Exchange."}:{title:"Listing not found",description:"This listing may have been removed from Jobsite Exchange.",robots:"noindex,follow"}},[s]);return j(r),c.useEffect(()=>{if(s.status==="ready"){const e=s.listing,i=m(e);L({"@context":"https://schema.org","@graph":[y(e),v([{name:"Home",url:"/"},{name:"Dirt Board",url:"/board"},{name:i,url:`/listings/${e.id}`}])]}),N(e.type)}else{const e=document.getElementById("jse-structured-data");e&&e.remove()}},[s]),s.status==="loading"?t.jsx(S,{}):s.status==="not-found"?t.jsx(B,{}):t.jsx($,{listing:s.listing})}export{C 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.