mobile responsive
This commit is contained in:
@@ -13,6 +13,7 @@ import { Table, THead, TH, TR, TD } from "@/components/ui/table";
|
||||
import { Can } from "@/components/staff-context";
|
||||
import { fmtDate } from "@/lib/utils";
|
||||
import { KIND_LABEL } from "./labels";
|
||||
import { Clamp } from "@/components/ui/clamp";
|
||||
|
||||
export default function QuizzesPage() {
|
||||
const [list, setList] = useState<Quiz[] | null>(null);
|
||||
@@ -68,9 +69,9 @@ export default function QuizzesPage() {
|
||||
<TD>
|
||||
<Link
|
||||
href={`/quizzes/${q.id}`}
|
||||
className="font-medium text-foreground hover:underline"
|
||||
className="block font-medium text-foreground hover:underline"
|
||||
>
|
||||
{q.title}
|
||||
<Clamp lines={2}>{q.title}</Clamp>
|
||||
</Link>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
Updated {fmtDate(q.updated_at)}
|
||||
@@ -79,13 +80,13 @@ export default function QuizzesPage() {
|
||||
<TD>
|
||||
<p className="text-sm">{KIND_LABEL[q.target_kind]}</p>
|
||||
{q.target_title && (
|
||||
<p className="truncate text-xs text-muted-foreground">
|
||||
<Clamp className="text-xs text-muted-foreground">
|
||||
{q.target_title}
|
||||
</p>
|
||||
</Clamp>
|
||||
)}
|
||||
</TD>
|
||||
<TD>{q.question_count}</TD>
|
||||
<TD>
|
||||
<TD className="[overflow-wrap:normal]">
|
||||
{q.completed_count ?? 0} finished
|
||||
<span className="text-muted-foreground">
|
||||
{" "}
|
||||
@@ -94,7 +95,7 @@ export default function QuizzesPage() {
|
||||
</TD>
|
||||
<TD>
|
||||
{q.published_at ? (
|
||||
<span className="rounded bg-primary/10 px-2 py-0.5 text-xs text-primary">
|
||||
<span className="rounded bg-primary/10 px-2 py-0.5 text-xs text-primary whitespace-nowrap">
|
||||
Published
|
||||
</span>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user