fix: optimize code

This commit is contained in:
javayhu 2025-03-23 07:56:50 +08:00
parent db054ccdcc
commit 3e0d1eaaa1
4 changed files with 6 additions and 4 deletions

View File

@ -64,9 +64,9 @@ export function ThemeSelector() {
size="sm"
className="cursor-pointer justify-start *:data-[slot=select-value]:w-12"
>
<span className="text-muted-foreground hidden sm:block">
{/* <span className="text-muted-foreground hidden sm:block">
Select a theme:
</span>
</span> */}
<span className="text-muted-foreground block sm:hidden">Theme</span>
<SelectValue placeholder="Select a theme" />
</SelectTrigger>

View File

@ -75,7 +75,8 @@ export function PricingCard({
isCurrentPlan = false,
}: PricingCardProps) {
const price = getPriceForPlan(plan, interval, paymentType);
const formattedPrice = plan.isFree ? 'Free' : price ? formatPrice(price.amount, price.currency) : 'Not Available';
const formattedPrice = plan.isFree ? 'Free' : price ?
formatPrice(price.amount, price.currency) : 'Not Available';
// Generate pricing label based on payment type and interval
let priceLabel = '';

View File

@ -56,6 +56,7 @@ export function PricingTable({
return (
<div className={className}>
{/* Show interval toggle if there are subscription plans */}
{(hasMonthlyOption || hasYearlyOption) && subscriptionPlans.length > 0 && (
<div className="flex justify-center mb-8">
<ToggleGroup

View File

@ -92,7 +92,7 @@
/* shadcn ui base colors for different themes */
/* https://ui.shadcn.com/docs/theming#base-colors */
:root {
--radius: 0.625rem;
--radius: 0.5rem;
--background: oklch(1 0 0);
--foreground: oklch(0.141 0.005 285.823);
--card: oklch(1 0 0);