Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions frontend/app/cards/CardsClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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.
<div className="rounded-2xl border border-[var(--border-subtle)] bg-[var(--bg-card)]/40 p-3 sm:p-5">
Expand Down
Loading