Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

💄 Render space tier with muted foreground in space dropdown (#2702)

Luke Vellaec71c144a799
diff --git a/apps/web/src/app/[locale]/(space)/settings/billing/components/hobby-plan-card.tsx b/apps/web/src/app/[locale]/(space)/settings/billing/components/hobby-plan-card.tsx
index 655338db0..90518bfd6 100644
--- a/apps/web/src/app/[locale]/(space)/settings/billing/components/hobby-plan-card.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/billing/components/hobby-plan-card.tsx
@@ -3,7 +3,10 @@
import { posthog } from "@rallly/posthog/client";
import { Button } from "@rallly/ui/button";
import { showPayWall } from "@/features/billing/client";
-import { SpaceTierIcon } from "@/features/space/components/space-tier";
+import {
+ SpaceTierIcon,
+ SpaceTierLabel,
+} from "@/features/space/components/space-tier";
import { Trans } from "@/i18n/client";
import {
PlanCard,
@@ -25,7 +28,9 @@ export function HobbyPlanCard({ className }: { className?: string }) {
<SpaceTierIcon tier="hobby" />
</PlanCardIcon>
<PlanCardContent>
- <PlanCardTitle>Hobby</PlanCardTitle>
+ <PlanCardTitle>
+ <SpaceTierLabel tier="hobby" />
+ </PlanCardTitle>
<PlanCardDescription>
<Trans
i18nKey="seatCount"
diff --git a/apps/web/src/app/[locale]/(space)/settings/billing/components/pro-plan-card.tsx b/apps/web/src/app/[locale]/(space)/settings/billing/components/pro-plan-card.tsx
index 63cee88a5..25eed16cf 100644
--- a/apps/web/src/app/[locale]/(space)/settings/billing/components/pro-plan-card.tsx
+++ b/apps/web/src/app/[locale]/(space)/settings/billing/components/pro-plan-card.tsx
@@ -11,7 +11,10 @@ import type {
BillingInterval,
SubscriptionStatus,
} from "@/features/billing/schema";
-import { SpaceTierIcon } from "@/features/space/components/space-tier";
+import {
+ SpaceTierIcon,
+ SpaceTierLabel,
+} from "@/features/space/components/space-tier";
import { Trans } from "@/i18n/client";
import { useDateTime, useDateTimeConfig } from "@/lib/datetime/client";
import { useSafeAction } from "@/lib/safe-action/client";
@@ -71,7 +74,9 @@ export function ProPlanCard({
</PlanCardIcon>
<PlanCardContent>
<div className="flex items-center gap-x-2">
- <PlanCardTitle>Pro</PlanCardTitle>
+ <PlanCardTitle>
+ <SpaceTierLabel tier="pro" />
+ </PlanCardTitle>
<SubscriptionStatusBadge status={status} />
</div>
<PlanCardDescription className="flex items-center">
diff --git a/apps/web/src/features/space/components/space-dropdown.tsx b/apps/web/src/features/space/components/space-dropdown.tsx
index 21a818013..5d33298d8 100644
--- a/apps/web/src/features/space/components/space-dropdown.tsx
+++ b/apps/web/src/features/space/components/space-dropdown.tsx
@@ -61,7 +61,7 @@ export function SpaceDropdown() {
<div className="truncate font-medium text-sm">
{activeSpace.name}
</div>
- <div className="text-xs">
+ <div className="text-muted-foreground text-xs">
<SpaceTierLabel tier={activeSpace.tier} />
</div>
</div>
diff --git a/apps/web/src/features/space/components/space-tier.tsx b/apps/web/src/features/space/components/space-tier.tsx
index 34abd5097..c4b680a2d 100644
--- a/apps/web/src/features/space/components/space-tier.tsx
+++ b/apps/web/src/features/space/components/space-tier.tsx
@@ -7,9 +7,9 @@ import type { SpaceTier } from "@/features/space/schema";
export const SpaceTierLabel = ({ tier }: { tier: SpaceTier }) => {
switch (tier) {
case "hobby":
- return <span className="text-foreground">{PLAN_NAMES.HOBBY}</span>;
+ return PLAN_NAMES.HOBBY;
case "pro":
- return <span className="text-foreground">{PLAN_NAMES.PRO}</span>;
+ return PLAN_NAMES.PRO;
}
};