From f8f74d3ce188cb1e59f2e2c60e089c249688cd30 Mon Sep 17 00:00:00 2001 From: Peter Lord Date: Wed, 29 Jul 2026 20:37:11 -0700 Subject: [PATCH] Sync the view dropdown when Top tier sort switches to card view --- frontend/app/cards/CardsClient.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/app/cards/CardsClient.tsx b/frontend/app/cards/CardsClient.tsx index 1877a235..f8d77542 100644 --- a/frontend/app/cards/CardsClient.tsx +++ b/frontend/app/cards/CardsClient.tsx @@ -220,7 +220,12 @@ function CardsClientInner({ initialCards }: { initialCards: Card[] }) { resultCount={sortedCards.length} sortOptions={sortOptions} sortValue={sort} - onSortChange={(v) => setFilterAndUrl("sort", v, setSort)} + onSortChange={(v) => { + setFilterAndUrl("sort", v, setSort); + // Score sort is designed around the full card renders; switch the + // view WITH the dropdown instead of silently overriding it below. + if (v === "score" && view !== "card") pickView("card"); + }} filters={[ { label: "View", @@ -265,8 +270,7 @@ function CardsClientInner({ initialCards }: { initialCards: Card[] }) { ]} /> - {view === "card" || sort === "score" ? ( - // Score sort always uses the card view and shows WR / picks per card. + {view === "card" ? ( // Sit the transparent card renders on a subtle panel so the grid reads // as a contained module instead of floating on the page background.