From 09dc73461325d42ceaf8566dddedca2b2d7de5ad Mon Sep 17 00:00:00 2001 From: gosangam Date: Thu, 15 Oct 2026 22:29:17 +0530 Subject: [PATCH] mobile responsive --- app/(app)/quizzes/quizzes-list.tsx | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/app/(app)/quizzes/quizzes-list.tsx b/app/(app)/quizzes/quizzes-list.tsx index f5a6055b..5a3dc661 100644 --- a/app/(app)/quizzes/quizzes-list.tsx +++ b/app/(app)/quizzes/quizzes-list.tsx @@ -67,7 +67,9 @@ export function QuizzesList() { {user && ( -
+ // Phones: three equal, thumb-sized tabs across the width. From sm up + // they shrink back to compact pills. +
{( [ ["all", "All"], @@ -80,10 +82,10 @@ export function QuizzesList() { type="button" onClick={() => setFilter(k)} className={cn( - "rounded-full px-3 py-1 text-sm transition-colors", + "min-h-10 rounded-full px-4 py-2 text-[15px] font-medium transition-colors sm:min-h-0 sm:px-3 sm:py-1 sm:text-sm sm:font-normal", filter === k ? "bg-primary text-primary-foreground dark:text-white" - : "text-muted-foreground hover:bg-muted hover:text-foreground", + : "bg-muted/60 text-muted-foreground hover:bg-muted hover:text-foreground sm:bg-transparent", )} > {label} @@ -101,19 +103,21 @@ export function QuizzesList() { : "Nothing here."}

) : ( -
    + // minmax(0,1fr) + min-w-0: grid items otherwise refuse to shrink + // below their content, so one long word pushes a card off-screen. +
      {shown.map((q) => { const done = q.my.state === "completed"; return ( -
    • +
    • {KIND[q.target_kind]}

      -

      +

      {q.title}

      {q.target_title && ( @@ -121,14 +125,14 @@ export function QuizzesList() { {q.target_title}

      )} -
      +
      {q.question_count}{" "} {q.question_count === 1 ? "question" : "questions"}