import { Fragment } from "react"; import { pricingTiers } from "../../data/pricingTiers"; import { pricingSections } from "../../data/pricingSections"; import { Link } from "react-router-dom"; function classNames(...classes) { return classes.filter(Boolean).join(" "); } export default function Comparison({ loggedIn }) { return (
{pricingTiers.map((tier, tierIdx) => (

{tier.name}

${tier.priceMonthly} {" "} /mo

{tier.description}

Buy {tier.name}
{pricingSections.map((section) => ( {section.features.map((feature) => ( ))}
{section.name}
Feature Included
{feature.name} {typeof feature.tiers[tier.name] === "string" ? ( {feature.tiers[tier.name]} ) : ( <> {feature.tiers[tier.name] === true ? ( ) : ( )} {feature.tiers[tier.name] === true ? "Yes" : "No"} )}
))}
window.scrollTo(0, 0)} to={loggedIn ? "/profile" : "/sign-up"} className="block w-full bg-gray-800 border border-gray-800 rounded-md py-2 text-sm font-semibold text-white text-center hover:bg-gray-900"> Buy {tier.name}
))}
{pricingTiers.map((tier) => ( ))} {pricingTiers.map((tier) => ( ))} {pricingSections.map((section) => ( {section.features.map((feature) => ( {pricingTiers.map((tier) => ( ))} ))} ))} {pricingTiers.map((tier) => ( ))}
Pricing plan comparison
Feature by Plans {tier.name}
Pricing

${tier.priceMonthly} {" "} /mo

{tier.description}

window.scrollTo(0, 0)} to={loggedIn ? "/profile" : "/sign-up"} className="block w-full bg-gray-800 border border-gray-800 rounded-md py-2 text-sm font-semibold text-white text-center hover:bg-gray-900"> Buy {tier.name}
{section.name}
{feature.name} {typeof feature.tiers[tier.name] === "string" ? ( {feature.tiers[tier.name]} ) : ( <> {feature.tiers[tier.name] === true ? ( ) : ( )} {feature.tiers[tier.name] === true ? "Included" : "Not included"}{" "} in {tier.name} )}
Choose your plan Buy {tier.name}
); }