Fix TypeScript typecheck errors
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { useNavigate, useLocation } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import type { TFunction } from 'i18next';
|
||||
import { Check, ChevronRight, ShieldCheck, Sparkles, X } from 'lucide-react';
|
||||
import { YStack, XStack } from '@tamagui/stacks';
|
||||
import { SizableText as Text } from '@tamagui/text';
|
||||
@@ -395,7 +396,11 @@ function PackageShopCompareView({
|
||||
}
|
||||
}
|
||||
|
||||
return t(`shop.features.${row.featureKey}`, row.featureKey);
|
||||
if (row.type === 'feature') {
|
||||
return t(`shop.features.${row.featureKey}`, row.featureKey);
|
||||
}
|
||||
|
||||
return row.id;
|
||||
};
|
||||
|
||||
const formatLimitValue = (value: number | null) => {
|
||||
@@ -562,7 +567,7 @@ function getPackageStatusLabel({
|
||||
isActive,
|
||||
owned,
|
||||
}: {
|
||||
t: (key: string, fallback?: string, options?: Record<string, unknown>) => string;
|
||||
t: TFunction;
|
||||
isActive?: boolean;
|
||||
owned?: TenantPackageSummary;
|
||||
}): string | null {
|
||||
@@ -622,7 +627,7 @@ function CheckoutConfirmation({ pkg, onCancel }: { pkg: Package; onCancel: () =>
|
||||
id="agb"
|
||||
size="$4"
|
||||
checked={agbAccepted}
|
||||
onCheckedChange={(checked) => setAgbAccepted(!!checked)}
|
||||
onCheckedChange={(checked: boolean) => setAgbAccepted(!!checked)}
|
||||
>
|
||||
<Checkbox.Indicator>
|
||||
<Check />
|
||||
@@ -638,7 +643,7 @@ function CheckoutConfirmation({ pkg, onCancel }: { pkg: Package; onCancel: () =>
|
||||
id="withdrawal"
|
||||
size="$4"
|
||||
checked={withdrawalAccepted}
|
||||
onCheckedChange={(checked) => setWithdrawalAccepted(!!checked)}
|
||||
onCheckedChange={(checked: boolean) => setWithdrawalAccepted(!!checked)}
|
||||
>
|
||||
<Checkbox.Indicator>
|
||||
<Check />
|
||||
@@ -687,7 +692,7 @@ function aggregateOwnedEntries(entries: TenantPackageSummary[]): TenantPackageSu
|
||||
}
|
||||
|
||||
function resolveIncludedTierLabel(
|
||||
t: (key: string, fallback?: string, options?: Record<string, unknown>) => string,
|
||||
t: TFunction,
|
||||
slug: string | null
|
||||
): string | null {
|
||||
if (!slug) {
|
||||
|
||||
Reference in New Issue
Block a user