- {session?.user && (
+ {/* {session?.user && (
Good to see you, {session.user.name?.split(" ")[0] ?? "there"}
- )}
+ )} */}
{business.name}
{location && (
@@ -176,9 +176,11 @@ export default async function CustomerHomePage() {
{/* Upcoming appointment */}
{upcomingAppointment && (
+ {session?.user && (
- Your Next Visit
-
+ {session.user.name?.split(" ")[0] ?? "Your Next Appointment"}, Your Next Appointment
+
+ )}
s.service.name).join(" + ")}
diff --git a/src/app/(customer)/loyalty/page.tsx b/src/app/(customer)/loyalty/page.tsx
index 2a5e410..2343f0f 100644
--- a/src/app/(customer)/loyalty/page.tsx
+++ b/src/app/(customer)/loyalty/page.tsx
@@ -86,10 +86,10 @@ export default async function LoyaltyPage() {
cardBackgroundImageUrl={loyalty.cardBackgroundImageUrl}
stampIcon={loyalty.stampIcon}
rewardPosition={loyalty.rewardPosition}
- cardTopRightText={loyalty.cardTopRightText}
+ cardTitleText={loyalty.cardTitleText}
cardFont={loyalty.cardFont}
- cardTopRightTextSize={loyalty.cardTopRightTextSize}
- cardTopRightTextColor={loyalty.cardTopRightTextColor}
+ cardTitleTextSize={loyalty.cardTitleTextSize}
+ cardTitleTextColor={loyalty.cardTitleTextColor}
cardBorderColor={loyalty.cardBorderColor}
cardMemberNumberColor={loyalty.cardMemberNumberColor}
/>
diff --git a/src/app/(owner)/owner/settings/loyalty/page.tsx b/src/app/(owner)/owner/settings/loyalty/page.tsx
index 81d2a1a..e420629 100644
--- a/src/app/(owner)/owner/settings/loyalty/page.tsx
+++ b/src/app/(owner)/owner/settings/loyalty/page.tsx
@@ -51,10 +51,10 @@ export default async function OwnerLoyaltyConfigPage() {
cardBackgroundImageUrl: programme.cardBackgroundImageUrl ?? undefined,
stampIcon: programme.stampIcon ?? undefined,
termsLine: programme.termsLine ?? undefined,
- cardTopRightText: programme.cardTopRightText ?? undefined,
+ cardTitleText: programme.cardTitleText ?? undefined,
cardFont: programme.cardFont,
- cardTopRightTextSize: programme.cardTopRightTextSize,
- cardTopRightTextColor: programme.cardTopRightTextColor ?? undefined,
+ cardTitleTextSize: programme.cardTitleTextSize,
+ cardTitleTextColor: programme.cardTitleTextColor ?? undefined,
cardBorderColor: programme.cardBorderColor ?? undefined,
cardMemberNumberColor: programme.cardMemberNumberColor ?? undefined,
}
@@ -68,7 +68,7 @@ export default async function OwnerLoyaltyConfigPage() {
earnOnCancelled: false,
earnOnNoShow: false,
cardFont: LoyaltyCardFont.SANS,
- cardTopRightTextSize: LoyaltyCardTextSize.MD,
+ cardTitleTextSize: LoyaltyCardTextSize.MD,
};
return (
diff --git a/src/components/ui/loyalty-card.tsx b/src/components/ui/loyalty-card.tsx
index 00023d5..faf54cb 100644
--- a/src/components/ui/loyalty-card.tsx
+++ b/src/components/ui/loyalty-card.tsx
@@ -13,10 +13,11 @@ const FONT_CLASSES: Record = {
[LoyaltyCardFont.MONO]: "font-mono",
};
-const TOP_RIGHT_TEXT_SIZE_CLASSES: Record = {
- [LoyaltyCardTextSize.SM]: "text-[8px]",
- [LoyaltyCardTextSize.MD]: "text-[10px]",
- [LoyaltyCardTextSize.LG]: "text-[13px]",
+/** MD matches the size "Loyalty Card" rendered at before this was configurable, so leaving this unset doesn't change the default look. */
+const TITLE_TEXT_SIZE_CLASSES: Record = {
+ [LoyaltyCardTextSize.SM]: "text-base",
+ [LoyaltyCardTextSize.MD]: "text-lg",
+ [LoyaltyCardTextSize.LG]: "text-2xl",
};
export interface LoyaltyCardProps {
@@ -32,10 +33,11 @@ export interface LoyaltyCardProps {
stampIcon?: string | null;
/** See resolveRewardThreshold's doc comment — determines whether the final stamp position renders as a normal stamp or as the reward slot itself. */
rewardPosition?: RewardPositionMode;
- cardTopRightText?: string | null;
+ /** Replaces the "Loyalty Card" title (top-left) when set. */
+ cardTitleText?: string | null;
cardFont?: LoyaltyCardFont;
- cardTopRightTextSize?: LoyaltyCardTextSize;
- cardTopRightTextColor?: string | null;
+ cardTitleTextSize?: LoyaltyCardTextSize;
+ cardTitleTextColor?: string | null;
cardBorderColor?: string | null;
cardMemberNumberColor?: string | null;
}
@@ -63,10 +65,10 @@ export function LoyaltyCard({
cardBackgroundImageUrl,
stampIcon,
rewardPosition = RewardPositionMode.AFTER_ALL_STAMPS,
- cardTopRightText,
+ cardTitleText,
cardFont = LoyaltyCardFont.SANS,
- cardTopRightTextSize = LoyaltyCardTextSize.MD,
- cardTopRightTextColor,
+ cardTitleTextSize = LoyaltyCardTextSize.MD,
+ cardTitleTextColor,
cardBorderColor,
cardMemberNumberColor,
}: LoyaltyCardProps) {
@@ -111,23 +113,18 @@ export function LoyaltyCard({
-
Loyalty Card
-
- {cardTopRightText && (
-
- {cardTopRightText}
-
- )}
-
- Member #{memberNumber}
-
-
+
+ {cardTitleText || "Loyalty Card"}
+
+
+ Member #{memberNumber}
+
{Array.from({ length: stampsRequired }, (_, i) => {
@@ -161,7 +158,7 @@ export function LoyaltyCard({
})}
{termsLine && (
-
{termsLine}
+
{termsLine}
)}