fix: use useI18n() instead of @/i18n import in PricingTableWorkspace (#8720)

## Summary

PricingTableWorkspace.vue was missed in #8704 which migrated all Vue
components from `import { t } from '@/i18n'` to `useI18n()` and upgraded
the lint rule to `error`. This breaks `pnpm lint` on main.

## Changes

- **What**: Removed `import { t } from '@/i18n'` and destructured `t`
from the existing `useI18n()` call. Moved `useI18n()` above static
initializers that reference `t`.

## Review Focus

The `billingCycleOptions` and `tiers` arrays call `t()` at module init
time — this is fine in `<script setup>` since `useI18n()` is called
first in the same synchronous scope.
This commit is contained in:
Hunter
2026-02-07 09:31:26 -08:00
committed by GitHub
parent dd4d36d459
commit 442eff1094

View File

@@ -285,7 +285,6 @@ import { useI18n } from 'vue-i18n'
import Button from '@/components/ui/button/Button.vue'
import { useBillingContext } from '@/composables/billing/useBillingContext'
import { t } from '@/i18n'
import {
TIER_PRICING,
TIER_TO_KEY
@@ -332,6 +331,8 @@ interface PricingTierConfig {
isPopular?: boolean
}
const { t, n } = useI18n()
const billingCycleOptions: BillingCycleOption[] = [
{ label: t('subscription.yearly'), value: 'yearly' },
{ label: t('subscription.monthly'), value: 'monthly' }
@@ -369,8 +370,6 @@ const tiers: PricingTierConfig[] = [
isPopular: false
}
]
const { n } = useI18n()
const {
plans: apiPlans,
currentPlanSlug,