RENTTOWNHOUSE

Bucharest

580 · Buc

kjhfksdfksdnfksdfnlksd sdfsdbkjfhsdkjf Fix /listings/[id] returning 404 incorrectly and make public browsing consistent. Goal: Public listings list and detail must both show ONLY published listings. Dashboard may show drafts, but should not link drafts to public detail. Tasks: 1) In lib/queries/listings.ts: - Ensure getListings() ALWAYS filters published_at IS NOT NULL for public pages. - Ensure getListingById(id) for public pages filters published_at IS NOT NULL. 2) In app/(public)/listings/page.tsx: - Confirm it uses the "published only" query, even if user is logged in. 3) In dashboard listings UI (app/dashboard/listings/page.tsx): - Change any "View details" link to point to the EDIT page: /dashboard/listings/[id]/edit - Optionally add a second link "Public View" that points to /listings/[id] ONLY if published_at is not null. 4) Verify: - /listings shows only published items - clicking a card goes to /listings/[id] and it loads (no 404) for published items - drafts are not visible on public pages - dashboard edit always works Run npm run dev and confirm behavior.

📷No photos uploaded yet
1 bd2 ba45 sqm

Listed by: Demo Agent

Request more info

We will reply quickly.

By sending, you agree to our Terms of Service.