48 lines
1.5 KiB
TypeScript
48 lines
1.5 KiB
TypeScript
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 from '@/components/select-analysis-packages';
|
|
import { PageBody } from '@kit/ui/page';
|
|
import { Trans } from '@kit/ui/trans';
|
|
|
|
import ComparePackagesModal from '../../_components/compare-packages-modal';
|
|
import { loadAnalysisPackages } from '../../_lib/server/load-analysis-packages';
|
|
|
|
export const generateMetadata = async () => {
|
|
const i18n = await createI18nServerInstance();
|
|
const title = i18n.t('order-analysis-package:title');
|
|
|
|
return {
|
|
title,
|
|
};
|
|
};
|
|
|
|
async function OrderAnalysisPackagePage() {
|
|
const { analysisElements, analysisPackages, countryCode } = await loadAnalysisPackages();
|
|
|
|
return (
|
|
<PageBody>
|
|
<div className="space-y-3 text-center">
|
|
<h3>
|
|
<Trans i18nKey={'marketing:selectPackage'} />
|
|
</h3>
|
|
<ComparePackagesModal
|
|
analysisElements={analysisElements}
|
|
analysisPackages={analysisPackages}
|
|
triggerElement={
|
|
<Button variant="secondary" className="gap-2">
|
|
<Trans i18nKey={'marketing:comparePackages'} />
|
|
<Scale className="size-4 stroke-[1.5px]" />
|
|
</Button>
|
|
}
|
|
/>
|
|
</div>
|
|
<SelectAnalysisPackages analysisPackages={analysisPackages} countryCode={countryCode} />
|
|
</PageBody>
|
|
);
|
|
}
|
|
|
|
export default withI18n(OrderAnalysisPackagePage);
|