Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
✨ Add icon guide (#1172)
Luke Vella293e146d1e20
diff --git a/apps/web/src/components/event-card.tsx b/apps/web/src/components/event-card.tsxindex dc85b2291..785b9f13d 100644--- a/apps/web/src/components/event-card.tsx+++ b/apps/web/src/components/event-card.tsx@@ -7,11 +7,31 @@ import { DotIcon, MapPinIcon, PauseIcon } from "lucide-react";import { useTranslation } from "@/app/i18n/client";import TruncatedLinkify from "@/components/poll/truncated-linkify";+import VoteIcon from "@/components/poll/vote-icon";import { PollStatusBadge } from "@/components/poll-status";import { RandomGradientBar } from "@/components/random-gradient-bar";import { Trans } from "@/components/trans";import { usePoll } from "@/contexts/poll";+function IconGuide() {+ return (+ <ul className="flex items-center gap-x-3 whitespace-nowrap text-sm">+ <li className="flex items-center gap-1.5">+ <VoteIcon type="yes" />+ <Trans i18nKey="yes" />+ </li>+ <li className="flex items-center gap-1.5">+ <VoteIcon type="ifNeedBe" />+ <Trans i18nKey="ifNeedBe" />+ </li>+ <li className="flex items-center gap-1.5">+ <VoteIcon type="no" />+ <Trans i18nKey="no" />+ </li>+ </ul>+ );+}+export function EventCard() {const poll = usePoll();const { t } = useTranslation();@@ -19,7 +39,7 @@ export function EventCard() {<><Card className="bg-gray-50"><RandomGradientBar seed={poll.id} />- <CardContent>+ <CardContent className="space-y-4 sm:space-y-6"><div className="flex flex-col items-start gap-4 lg:flex-row lg:justify-between"><div><h1 data-testid="poll-title" className="text-lg font-semibold">@@ -53,18 +73,21 @@ export function EventCard() {<PollStatusBadge status={poll.status} /></div>{poll.description ? (- <p className="mt-4 min-w-0 whitespace-pre-wrap text-pretty text-sm leading-relaxed">+ <p className="min-w-0 whitespace-pre-wrap text-pretty text-sm leading-relaxed"><TruncatedLinkify>{poll.description}</TruncatedLinkify></p>) : null}- {poll.location ? (- <p className="text-muted-foregroun mt-4 text-sm">- <Icon>- <MapPinIcon className="-mt-0.5 mr-2 inline-block" />- </Icon>- <TruncatedLinkify>{poll.location}</TruncatedLinkify>- </p>- ) : null}+ <div className="flex flex-col justify-between gap-4 sm:flex-row sm:flex-wrap sm:items-center">+ <IconGuide />+ {poll.location ? (+ <p className="text-muted-foregroun truncate whitespace-nowrap text-sm">+ <Icon>+ <MapPinIcon className="-mt-0.5 mr-1.5 inline-block" />+ </Icon>+ <TruncatedLinkify>{poll.location}</TruncatedLinkify>+ </p>+ ) : null}+ </div></CardContent></Card>{poll.status === "paused" ? (