Update progress badge layout in SharedGroupViewer
All checks were successful
Automated Container Build / build-and-push (push) Successful in 1m0s

This commit is contained in:
Elijah 2026-07-10 16:22:23 -07:00
parent 3cb9634524
commit 4203a3df41

View file

@ -84,14 +84,14 @@ export function SharedGroupViewer({ data }: { data: any }) {
</div>
</div>
<div className="flex items-center gap-3 mt-auto pl-1">
{progressMap[item.id] ? (
<span className="inline-flex items-center gap-1 px-2.5 py-1 rounded-full bg-primary/10 text-primary text-xs font-medium font-bold">
{progressMap[item.id].currentIndex} / {progressMap[item.id].total} {data.type === "DECK" ? "cards" : "questions"}
</span>
) : (
<span className="inline-flex items-center gap-1 px-2.5 py-1 rounded-full bg-badge-bg text-badge-text text-xs font-medium">
{data.type === "DECK" ? `${item.cards?.length || 0} cards` : `${item.questions?.length || 0} questions`}
<div className="flex items-center justify-between gap-3 mt-auto px-1">
<span className="inline-flex items-center gap-1 px-2.5 py-1 rounded-full bg-badge-bg text-badge-text text-xs font-medium">
{data.type === "DECK" ? `${item.cards?.length || 0} cards` : `${item.questions?.length || 0} questions`}
</span>
{progressMap[item.id] && (
<span className="inline-flex items-center gap-1 px-2.5 py-1 rounded-full bg-primary/10 text-primary text-xs font-bold">
In Progress: {progressMap[item.id].currentIndex} / {progressMap[item.id].total}
</span>
)}
</div>