feat(MED-122): use <Trans> instead of t()

This commit is contained in:
2025-07-10 13:24:03 +03:00
parent ad213dd4f8
commit 7b71da3825
4 changed files with 45 additions and 43 deletions

View File

@@ -3,8 +3,9 @@ import { Scale } from 'lucide-react';
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
import { withI18n } from '~/lib/i18n/with-i18n';
import { Button } from '@kit/ui/button';
import SelectAnalysisPackages, { IAnalysisPackage } from '@/components/select-analysis-packages';
import SelectAnalysisPackages from '@/components/select-analysis-packages';
import { PageBody } from '@kit/ui/page';
import { Trans } from '@kit/ui/trans';
import ComparePackagesModal from '../../_components/compare-packages-modal';
@@ -17,49 +18,23 @@ export const generateMetadata = async () => {
};
};
const dummyCards = [
{
titleKey: 'product:standard.label',
price: 40,
nrOfAnalyses: 4,
tagColor: 'bg-cyan',
descriptionKey: 'marketing:standard.description',
},
{
titleKey: 'product:standardPlus.label',
price: 85,
nrOfAnalyses: 10,
tagColor: 'bg-warning',
descriptionKey: 'product:standardPlus.description',
},
{
titleKey: 'product:premium.label',
price: 140,
nrOfAnalyses: '12+',
tagColor: 'bg-purple',
descriptionKey: 'product:premium.description',
},
] satisfies IAnalysisPackage[];
async function OrderAnalysisPackagePage() {
const { t } = await createI18nServerInstance();
return (
<PageBody>
<div className="space-y-3 text-center">
<h3>{t('marketing:selectPackage')}</h3>
<h3>
<Trans i18nKey={'marketing:selectPackage'} />
</h3>
<ComparePackagesModal
triggerElement={
<Button variant="secondary" className="gap-2">
{t('marketing:comparePackages')}
<Trans i18nKey={'marketing:comparePackages'} />
<Scale className="size-4 stroke-[1.5px]" />
</Button>
}
/>
</div>
<SelectAnalysisPackages analysisPackages={dummyCards} />
<SelectAnalysisPackages />
</PageBody>
);
}