prettier fix

This commit is contained in:
Danel Kungla
2025-09-19 17:22:36 +03:00
parent efa94b3322
commit 0c2cfe6d18
509 changed files with 17988 additions and 9920 deletions

View File

@@ -1,9 +1,13 @@
import { JSX } from 'react';
import { StoreProduct } from '@medusajs/types';
import { QuestionMarkCircledIcon } from '@radix-ui/react-icons';
import { VisuallyHidden } from '@radix-ui/react-visually-hidden';
import { Check, X } from 'lucide-react';
import { PackageHeader } from '@kit/shared/components/package-header';
import { AnalysisPackageWithVariant } from '@kit/shared/components/select-analysis-package';
import { InfoTooltip } from '@kit/shared/components/ui/info-tooltip';
import {
Dialog,
DialogContent,
@@ -18,14 +22,14 @@ import {
TableHeader,
TableRow,
} from '@kit/ui/table';
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
import { PackageHeader } from '@kit/shared/components/package-header';
import { InfoTooltip } from '@kit/shared/components/ui/info-tooltip';
import { StoreProduct } from '@medusajs/types';
import { AnalysisPackageWithVariant } from '@kit/shared/components/select-analysis-package';
import { withI18n } from '~/lib/i18n/with-i18n';
export type AnalysisPackageElement = Pick<StoreProduct, 'title' | 'id' | 'description'> & {
export type AnalysisPackageElement = Pick<
StoreProduct,
'title' | 'id' | 'description'
> & {
isIncludedInStandard: boolean;
isIncludedInStandardPlus: boolean;
isIncludedInPremium: boolean;
@@ -39,7 +43,11 @@ const CheckWithBackground = () => {
);
};
const PackageTableHead = async ({ product }: { product: AnalysisPackageWithVariant }) => {
const PackageTableHead = async ({
product,
}: {
product: AnalysisPackageWithVariant;
}) => {
const { t, language } = await createI18nServerInstance();
const { title, price, nrOfAnalyses } = product;
@@ -48,14 +56,14 @@ const PackageTableHead = async ({ product }: { product: AnalysisPackageWithVaria
<TableHead className="py-2">
<PackageHeader
title={t(title)}
tagColor='bg-cyan'
tagColor="bg-cyan"
analysesNr={t('product:nrOfAnalyses', { nr: nrOfAnalyses })}
language={language}
price={price}
/>
</TableHead>
)
}
);
};
const ComparePackagesModal = async ({
analysisPackages,
@@ -69,7 +77,9 @@ const ComparePackagesModal = async ({
const { t } = await createI18nServerInstance();
const standardPackage = analysisPackages.find(({ isStandard }) => isStandard);
const standardPlusPackage = analysisPackages.find(({ isStandardPlus }) => isStandardPlus);
const standardPlusPackage = analysisPackages.find(
({ isStandardPlus }) => isStandardPlus,
);
const premiumPackage = analysisPackages.find(({ isPremium }) => isPremium);
if (!standardPackage || !standardPlusPackage || !premiumPackage) {
@@ -100,7 +110,7 @@ const ComparePackagesModal = async ({
<p className="text-muted-foreground mx-auto w-3/5 text-sm">
{t('product:healthPackageComparison.description')}
</p>
<div className="rounded-md border max-h-[80vh] overflow-y-auto">
<div className="max-h-[80vh] overflow-y-auto rounded-md border">
<Table>
<TableHeader>
<TableRow>
@@ -112,16 +122,14 @@ const ComparePackagesModal = async ({
</TableHeader>
<TableBody>
{analysisPackageElements.map(
(
{
title,
id,
description,
isIncludedInStandard,
isIncludedInStandardPlus,
isIncludedInPremium,
},
) => {
({
title,
id,
description,
isIncludedInStandard,
isIncludedInStandardPlus,
isIncludedInPremium,
}) => {
if (!title) {
return null;
}
@@ -130,20 +138,28 @@ const ComparePackagesModal = async ({
<TableRow key={id}>
<TableCell className="py-6 sm:max-w-[30vw]">
{title}{' '}
{description && (<InfoTooltip content={description} icon={<QuestionMarkCircledIcon />} />)}
{description && (
<InfoTooltip
content={description}
icon={<QuestionMarkCircledIcon />}
/>
)}
</TableCell>
<TableCell align="center" className="py-6">
{isIncludedInStandard && <CheckWithBackground />}
</TableCell>
<TableCell align="center" className="py-6">
{isIncludedInStandardPlus && <CheckWithBackground />}
{isIncludedInStandardPlus && (
<CheckWithBackground />
)}
</TableCell>
<TableCell align="center" className="py-6">
{isIncludedInPremium && <CheckWithBackground />}
</TableCell>
</TableRow>
);
})}
},
)}
</TableBody>
</Table>
</div>