import Link from 'next/link' import { Fragment, useMemo } from 'react' import { cn } from 'ui' import pricingAddOn from '~/data/PricingAddOnTable.json' import { IconPricingIncludedCheck, IconPricingMinus } from './PricingIcons' const ComputePricingTable = () => { const columnNames = useMemo( () => pricingAddOn.database.rows.map((row) => row.columns.map((column) => ({ key: column.key, title: column.title })) )[0], [] ) return ( <>
{columnNames.map((column) => ( ))} {pricingAddOn.database.rows.map((row, i) => ( {i === 0 && ( )} {row.columns.map((column) => ( ))} ))}
{column.title}
First instance is free on paid plans
{column.key === 'dedicated' ? ( column.value ? ( ) : ( ) ) : column.url ? ( {column.value} ) : ( column.value )}
{pricingAddOn.database.rows.map((row, i) => ( {row.columns.map((column) => ( ))} ))}
{column.title} {column.key === 'dedicated' ? ( column.value ? ( ) : ( ) ) : ( column.value )}
) } export default ComputePricingTable