Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
💄 Use alert component
Luke Vellac512630f8834
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.jsonindex e96ae6ee2..598d62670 100644--- a/apps/web/public/locales/en/app.json+++ b/apps/web/public/locales/en/app.json@@ -172,7 +172,6 @@"noParticipantsDescription": "Click <b>Share</b> to invite participants","timeShownIn": "Times shown in {timeZone}","pollStatusPausedDescription": "Votes cannot be submitted or edited at this time",- "eventHostTitle": "Manage Access","eventHostDescription": "You are the creator of this poll","deleteAccount": "Delete Account","deleteAccountDialogTitle": "Delete Account",diff --git a/apps/web/src/app/[locale]/invite/[urlId]/invite-page.tsx b/apps/web/src/app/[locale]/invite/[urlId]/invite-page.tsxindex 13f0245cc..ad2300555 100644--- a/apps/web/src/app/[locale]/invite/[urlId]/invite-page.tsx+++ b/apps/web/src/app/[locale]/invite/[urlId]/invite-page.tsx@@ -1,7 +1,7 @@"use client";-import { ArrowUpRightIcon, UserCircle2Icon } from "lucide-react";+import { Alert, AlertDescription } from "@rallly/ui/alert";+import { ArrowUpRightIcon, CrownIcon } from "lucide-react";import Link from "next/link";-import Discussion from "@/components/discussion";import { EventCard } from "@/components/event-card";import { PollFooter } from "@/components/poll/poll-footer";@@ -21,31 +21,28 @@ const GoToApp = () => {}return (- <div className="rounded-lg border border-primary-200 bg-primary-50/75 p-2.5 text-sm sm:p-1.5">- <div className="flex items-start justify-between sm:items-center">- <div className="flex gap-2.5 sm:items-center lg:px-2.5">- <UserCircle2Icon className="hidden size-4 text-primary-600 sm:block" />- <div className="flex grow flex-col gap-x-2.5 sm:flex-row">- <h4 className="font-medium text-primary-600">- <Trans i18nKey="eventHostTitle" defaults="Manage Access" />- </h4>- <p className="text-primary-600/75">- <Trans- i18nKey="eventHostDescription"- defaults="You are the creator of this poll"- />- </p>+ <Alert variant="primary">+ <CrownIcon />+ <AlertDescription>+ <div className="flex w-full flex-1 items-center gap-2">+ <p className="flex-1">+ <Trans+ i18nKey="eventHostDescription"+ defaults="You are the creator of this poll"+ />+ </p>+ <div>+ <Link+ className="inline-flex items-center gap-2 text-primary hover:underline"+ href={`/poll/${poll.id}`}+ >+ <Trans i18nKey="manage" defaults="Manage" />+ <ArrowUpRightIcon className="size-4" />+ </Link></div></div>- <Link- className="inline-flex h-9 items-center gap-x-2.5 rounded-md px-3 font-medium text-primary-600 hover:bg-primary-200/50 active:bg-primary-200"- href={`/poll/${poll.id}`}- >- <Trans i18nKey="manage" />- <ArrowUpRightIcon className="size-4" />- </Link>- </div>- </div>+ </AlertDescription>+ </Alert>);};diff --git a/packages/ui/src/alert.tsx b/packages/ui/src/alert.tsxindex 5fead028e..7c9e43847 100644--- a/packages/ui/src/alert.tsx+++ b/packages/ui/src/alert.tsx@@ -11,7 +11,7 @@ const alertVariants = cva(variant: {default: "bg-card text-card-foreground",primary:- "border-indigo-200 bg-indigo-50 text-indigo-600 has-[[data-slot=alert-description]]:text-indigo-800/90 [&>svg]:text-indigo-600",+ "border-primary-200 bg-primary-50 has-[[data-slot=alert-description]]:text-primary-700/90 [&>svg]:text-primary-600",destructive:"border-destructive/20 bg-destructive-background text-destructive-foreground has-[[data-slot=alert-description]]:opacity-50",info: "border-blue-200 bg-blue-50 text-blue-900 has-[[data-slot=alert-description]]:text-blue-800/90 [&>svg]:text-blue-600",