Show participated polls on polls page + UI refresh (#1089)

This commit is contained in:
Luke Vella 2024-05-12 13:20:00 +08:00 committed by GitHub
parent bd9e9fe95b
commit f8a217ae75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
125 changed files with 3007 additions and 2363 deletions

View file

@ -1,5 +1,6 @@
import { zodResolver } from "@hookform/resolvers/zod";
import { VoteType } from "@rallly/database";
import { Badge } from "@rallly/ui/badge";
import { Button } from "@rallly/ui/button";
import { Input } from "@rallly/ui/input";
import clsx from "clsx";
@ -66,15 +67,13 @@ const VoteSummary = ({
return (
<div
key={voteType}
className="flex h-8 select-none divide-x rounded border bg-gray-50 text-sm"
className="flex h-8 select-none gap-2.5 rounded-lg border bg-gray-50 p-1 text-sm"
>
<div className="flex items-center gap-2 pl-2 pr-3">
<div className="flex items-center gap-2">
<VoteIcon type={voteType} />
<div>{t(voteType)}</div>
</div>
<div className="flex h-full items-center justify-center px-2 text-sm font-semibold text-gray-800">
{voteByType[voteType].length}
<div className="text-muted-foreground">{t(voteType)}</div>
</div>
<Badge>{voteByType[voteType].length}</Badge>
</div>
);
})}