Skip to content

Pull real data for desk pages#34

Merged
maquchizi merged 5 commits into
mainfrom
pull-real-data-for-desk-pages
Jun 30, 2026
Merged

Pull real data for desk pages#34
maquchizi merged 5 commits into
mainfrom
pull-real-data-for-desk-pages

Conversation

@maquchizi

Copy link
Copy Markdown
Collaborator

Summary

  • Wire content desk pages (/fact-checks/[desk]) to live Hasura data. The listing fetches that desk's fact-checks (route-scoped, reusing the existing server-side filter + pagination), and the hero gets its own carousel from a per-desk "<Desk Name> — Hero" content list.
  • Handle not-yet-authored desk content gracefully: a missing hero list, an empty list, and a fetch error all collapse to one hero empty state (masthead + "No featured fact-checks for this desk yet.", no carousel). The grid's empty message is now filter-aware so empty-with-no-filters doesn't read as "no matches for your filters."
  • Extract the duplicated hero carousel and banner shell into shared components/ui/HeroCarousel + HeroBanner; the home and desk heroes are now thin compositions (and drop "use client"). This also collapses the slide/dot key logic into one place.
  • Drive-by fixes: carousel keys use story.href + index so duplicate placeholder images/titles can't collide (the warning previously persisted on the dots and on the static fallback); set data-scroll-behavior="smooth" so Next doesn't smooth-scroll during route changes.

Test plan

  • Desk page (e.g. /fact-checks/climate-change): title + hero empty state render with no carousel; grid shows "No fact-checks have been published here yet." (desk routes are empty on staging).
  • An article slug on the overloaded route still renders the article, not the desk page.
  • Filters/pagination on a desk page drive the URL and re-fetch the route-scoped slice.
  • Home hero renders title/subtitle/CTA + carousel with no duplicate-key console warning.
  • pnpm test (73 pass, incl. new route-clause cases), tsc, biome clean.

Closes #33

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pesacheck-ui Ready Ready Preview, Comment Jun 29, 2026 10:21am

Request Review

@maquchizi maquchizi requested a review from kelvinkipruto June 29, 2026 10:21
@maquchizi maquchizi merged commit 88b4fce into main Jun 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wire content desk pages (/fact-checks/[desk]) to live Hasura data

2 participants