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) => (
|
{column.title}
|
))}
{pricingAddOn.database.rows.map((row, i) => (
{i === 0 && (
|
First instance is free on paid plans
|
)}
{row.columns.map((column) => (
|
{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