Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

41.5 KB
Raw Blame
"use cache";

import { PLAN_NAMES } from "@rallly/billing";
import { buttonVariants } from "@rallly/ui";
import { Badge } from "@rallly/ui/badge";
import {
  BlocksIcon,
  CalendarSearchIcon,
  ClockIcon,
  CopyIcon,
  EyeOffIcon,
  ListChecksIcon,
  MailPlusIcon,
  PaletteIcon,
  Settings2Icon,
  TerminalIcon,
  UserPlusIcon,
  UsersIcon,
} from "lucide-react";
import { cacheLife } from "next/cache";
import Link from "next/link";
import { Trans } from "react-i18next/TransWithoutContext";
import {
  CompareTable,
  CompareTableCell,
  CompareTableCheck,
  CompareTableDash,
  CompareTableFeature,
  CompareTableFeatureDescription,
  CompareTableFeatureName,
  CompareTableHead,
  CompareTableHeader,
  CompareTableSection,
} from "@/components/compare-table";
import { PeopleBadge, PollsBadge } from "@/components/home/animated-number";
import { Cta } from "@/components/home/cta";
import { FaqItem, FaqSection } from "@/components/home/faq";
import { Stats } from "@/components/home/stats";
import {
  Section,
  SectionContent,
  SectionDescription,
  SectionHeading,
  SectionTitle,
} from "@/components/section";
import { getTranslation } from "@/i18n/server";
import { getAlternates } from "@/lib/alternates";
import {
  getMonthlyPollCount,
  getMonthlyVoterCount,
  getPricing,
} from "@/lib/data";
import { linkToApp } from "@/lib/linkToApp";
import {
  FREE_OPEN_POLL_LIMIT,
  isOpenPollLimitEnabled,
} from "@/lib/open-poll-limit";
import {
  PlanBenefit,
  PlanBenefitName,
  PlanBenefits,
  PlanCard,
  PlanCardDescription,
  PlanCardHeader,
  PlanCardName,
  PlanCardPrice,
  PlanCardPriceAmount,
  PlanCardPriceLabel,
  PlanCards,
} from "./plan-card";
import {
  BillingIntervalSwitch,
  BillingIntervalValue,
  CurrencySelect,
  PlanPrice,
  PricingControls,
  PricingControlsDivider,
  PricingProvider,
} from "./pricing-controls";

const faqLinkClassName =
  "text-gray-800 underline underline-offset-2 hover:text-gray-600";

const apiDocsUrl = "https://support.rallly.co/api-reference/introduction";
const webhooksDocsUrl = "https://support.rallly.co/api-reference/webhooks";

export default async function Page(props: {
  params: Promise<{ locale: string }>;
}) {
  cacheLife("hours");
  const { locale } = await props.params;
  const { t } = await getTranslation(locale, ["common", "pricing", "home"]);
  const [pollCount, voterCount, prices] = await Promise.all([
    getMonthlyPollCount(),
    getMonthlyVoterCount(),
    getPricing(),
  ]);
  const included = t("included", {
    ns: "pricing",
    defaultValue: "Included",
  });
  const notIncluded = t("notIncluded", {
    ns: "pricing",
    defaultValue: "Not included",
  });
  return (
    <div className="divide-y">
      <Section>
        <PricingProvider
          prices={prices}
          defaultCurrency={prices.usd ? "usd" : Object.keys(prices)[0]}
          locale={locale}
        >
          <div className="flex flex-col items-center gap-y-8 text-center">
            <div>
              <h1 className="mx-auto max-w-[700px] text-balance font-medium text-3xl text-gray-800 tracking-tight sm:text-[2.75rem]/none">
                {t("pricingTitle", {
                  ns: "pricing",
                  defaultValue: "Pricing",
                })}
              </h1>
              <p className="mx-auto mt-4 max-w-[620px] text-pretty font-normal text-base/6 text-gray-500 sm:text-lg sm:leading-relaxed">
                {t("pricingSubtitle", {
                  ns: "pricing",
                  defaultValue:
                    "Upgrade to a paid plan to get access to premium features",
                })}
              </p>
            </div>
            <PricingControls>
              <CurrencySelect
                label={t("currency", {
                  ns: "pricing",
                  defaultValue: "Currency",
                })}
              />
              <PricingControlsDivider />
              <BillingIntervalSwitch
                switchLabel={t("payYearly", {
                  ns: "pricing",
                  defaultValue: "Pay yearly",
                })}
                monthlyLabel={
                  <Trans
                    t={t}
                    ns="pricing"
                    i18nKey="payMonthly"
                    defaults="Pay monthly"
                  />
                }
                yearlyLabel={
                  <Trans
                    t={t}
                    ns="pricing"
                    i18nKey="payYearly"
                    defaults="Pay yearly"
                  />
                }
                badge={
                  <Badge
                    variant="pill"
                    className="bg-lime-300 font-semibold text-lime-900"
                  >
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="yearlySaveUpTo"
                      defaults="Save up to {percent}%"
                      values={{ percent: 40 }}
                    />
                  </Badge>
                }
              />
            </PricingControls>
          </div>
          <PlanCards className="mx-auto mt-8 sm:mt-10">
            <PlanCard>
              <PlanCardHeader>
                <PlanCardName>{PLAN_NAMES.HOBBY}</PlanCardName>
                <PlanCardDescription>
                  <Trans
                    t={t}
                    ns="pricing"
                    i18nKey="planFreeDescription"
                    defaults="For casual users"
                  />
                </PlanCardDescription>
              </PlanCardHeader>
              <PlanCardPrice>
                <PlanCardPriceAmount>
                  <Trans
                    t={t}
                    ns="pricing"
                    i18nKey="planFree"
                    defaults="Free"
                  />
                </PlanCardPriceAmount>
              </PlanCardPrice>
              <div>
                <Link
                  href={linkToApp("/", {
                    ref: "pricing",
                    cta: "pricing_free",
                  })}
                  className={buttonVariants({
                    shape: "rounded",
                    className: "w-full",
                  })}
                >
                  <Trans
                    t={t}
                    ns="common"
                    i18nKey="getStarted"
                    defaults="Get started"
                  />
                </Link>
              </div>
              <PlanBenefits>
                <PlanBenefit icon={<CalendarSearchIcon />}>
                  <PlanBenefitName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="basicPolls"
                      defaults="Basic polls"
                    />
                  </PlanBenefitName>
                </PlanBenefit>
                {isOpenPollLimitEnabled ? (
                  <PlanBenefit icon={<ListChecksIcon />}>
                    <PlanBenefitName>
                      <Trans
                        t={t}
                        ns="pricing"
                        i18nKey="freeOpenPollLimit"
                        defaults="Up to {count} open polls"
                        values={{ count: FREE_OPEN_POLL_LIMIT }}
                      />
                    </PlanBenefitName>
                  </PlanBenefit>
                ) : null}
                <PlanBenefit icon={<ClockIcon />}>
                  <PlanBenefitName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="thirtyDayPollRetention"
                      defaults="30 day poll retention"
                    />
                  </PlanBenefitName>
                </PlanBenefit>
              </PlanBenefits>
            </PlanCard>
            <PlanCard>
              <PlanCardHeader>
                <div className="flex items-center justify-between gap-x-4">
                  <PlanCardName>{PLAN_NAMES.PRO}</PlanCardName>
                  <Badge variant="secondary">
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="recommended"
                      defaults="Recommended"
                    />
                  </Badge>
                </div>
                <PlanCardDescription>
                  <Trans
                    t={t}
                    ns="pricing"
                    i18nKey="planProDescription"
                    defaults="For power users and professionals"
                  />
                </PlanCardDescription>
              </PlanCardHeader>
              <PlanCardPrice>
                <PlanCardPriceAmount>
                  <PlanPrice />
                </PlanCardPriceAmount>
                <PlanCardPriceLabel>
                  <BillingIntervalValue
                    yearly={
                      <Trans
                        t={t}
                        ns="pricing"
                        i18nKey="perSeatMonthBilledYearly"
                        defaults="/seat/mo, billed yearly"
                      />
                    }
                    monthly={
                      <Trans
                        t={t}
                        ns="pricing"
                        i18nKey="perSeatMonth"
                        defaults="/seat/mo"
                      />
                    }
                  />
                </PlanCardPriceLabel>
              </PlanCardPrice>
              <div>
                <Link
                  href={linkToApp("/settings/billing", {
                    ref: "pricing",
                    cta: "pricing_pro",
                  })}
                  className={buttonVariants({
                    variant: "primary",
                    shape: "rounded",
                    className: "w-full",
                  })}
                >
                  <Trans
                    t={t}
                    ns="pricing"
                    i18nKey="getPro"
                    defaults="Get Pro"
                  />
                </Link>
              </div>
              <PlanBenefits className="sm:grid-cols-2 sm:gap-x-6">
                {isOpenPollLimitEnabled ? (
                  <PlanBenefit icon={<ListChecksIcon />}>
                    <PlanBenefitName>
                      <Trans
                        t={t}
                        ns="pricing"
                        i18nKey="unlimitedOpenPolls"
                        defaults="Unlimited open polls"
                      />
                    </PlanBenefitName>
                  </PlanBenefit>
                ) : null}
                <PlanBenefit icon={<ClockIcon />}>
                  <PlanBenefitName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="indefinitePollRetention"
                      defaults="Indefinite poll retention"
                    />
                  </PlanBenefitName>
                </PlanBenefit>
                <PlanBenefit icon={<CopyIcon />}>
                  <PlanBenefitName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="duplicatePolls"
                      defaults="Duplicate polls"
                    />
                  </PlanBenefitName>
                </PlanBenefit>
                <PlanBenefit icon={<Settings2Icon />}>
                  <PlanBenefitName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="advancedPollSettings"
                      defaults="Advanced poll settings"
                    />
                  </PlanBenefitName>
                </PlanBenefit>
                <PlanBenefit icon={<MailPlusIcon />}>
                  <PlanBenefitName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="emailInvites"
                      defaults="Email invites"
                    />
                  </PlanBenefitName>
                </PlanBenefit>
                <PlanBenefit icon={<UserPlusIcon />}>
                  <PlanBenefitName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="teamCollaboration"
                      defaults="Team collaboration"
                    />
                  </PlanBenefitName>
                </PlanBenefit>
                <PlanBenefit icon={<PaletteIcon />}>
                  <PlanBenefitName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="customBranding"
                      defaults="Custom branding"
                    />
                  </PlanBenefitName>
                </PlanBenefit>
                <PlanBenefit icon={<EyeOffIcon />}>
                  <PlanBenefitName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="removeAttribution"
                      defaults="Remove attribution"
                    />
                  </PlanBenefitName>
                </PlanBenefit>
                <PlanBenefit icon={<TerminalIcon />}>
                  <PlanBenefitName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="apiAndWebhooks"
                      defaults="API and webhooks"
                    />
                  </PlanBenefitName>
                </PlanBenefit>
              </PlanBenefits>
            </PlanCard>
          </PlanCards>
        </PricingProvider>
        <Stats className="mt-8 sm:mt-12">
          <Trans
            t={t}
            ns="home"
            i18nKey="statsLast30Days"
            defaults="<0>{voterCount, plural, one {# person} other {# people}}</0> voted on <1>{pollCount, plural, one {# poll} other {# polls}}</1> in the last 30 days"
            values={{ voterCount, pollCount }}
            components={[
              <PeopleBadge key="people" locale={locale} live />,
              <PollsBadge key="polls" locale={locale} live />,
            ]}
          />
        </Stats>
      </Section>
      <Section>
        <SectionHeading>
          <SectionTitle>
            <Trans
              t={t}
              ns="pricing"
              i18nKey="comparePlans"
              defaults="Compare plans"
            />
          </SectionTitle>
          <SectionDescription>
            <Trans
              t={t}
              ns="pricing"
              i18nKey="comparePlansDescription"
              defaults="See what's included in each plan."
            />
          </SectionDescription>
        </SectionHeading>
        <SectionContent>
          <CompareTable>
            <CompareTableHeader>
              <tr>
                <th className="w-3/5">
                  <span className="sr-only">
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="compareFeature"
                      defaults="Feature"
                    />
                  </span>
                </th>
                <CompareTableHead>{PLAN_NAMES.HOBBY}</CompareTableHead>
                <CompareTableHead>{PLAN_NAMES.PRO}</CompareTableHead>
              </tr>
            </CompareTableHeader>
            <tbody className="divide-y">
              <CompareTableSection
                icon={<CalendarSearchIcon aria-hidden="true" />}
              >
                <Trans
                  t={t}
                  ns="pricing"
                  i18nKey="compareSchedulingPoll"
                  defaults="Scheduling poll"
                />
              </CompareTableSection>
              {isOpenPollLimitEnabled ? (
                <tr>
                  <CompareTableFeature>
                    <CompareTableFeatureName>
                      <Trans
                        t={t}
                        ns="pricing"
                        i18nKey="compareOpenPolls"
                        defaults="Open polls"
                      />
                    </CompareTableFeatureName>
                    <CompareTableFeatureDescription>
                      <Trans
                        t={t}
                        ns="pricing"
                        i18nKey="compareOpenPollsDescription"
                        defaults="Polls collecting votes at the same time"
                      />
                    </CompareTableFeatureDescription>
                  </CompareTableFeature>
                  <CompareTableCell>{FREE_OPEN_POLL_LIMIT}</CompareTableCell>
                  <CompareTableCell>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="compareUnlimited"
                      defaults="Unlimited"
                    />
                  </CompareTableCell>
                </tr>
              ) : (
                <tr>
                  <CompareTableFeature>
                    <CompareTableFeatureName>
                      <Trans
                        t={t}
                        ns="pricing"
                        i18nKey="comparePolls"
                        defaults="Polls"
                      />
                    </CompareTableFeatureName>
                    <CompareTableFeatureDescription>
                      <Trans
                        t={t}
                        ns="pricing"
                        i18nKey="compareSchedulingPollsDescription"
                        defaults="Create polls to find the best time to meet"
                      />
                    </CompareTableFeatureDescription>
                  </CompareTableFeature>
                  <CompareTableCell>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="compareUnlimited"
                      defaults="Unlimited"
                    />
                  </CompareTableCell>
                  <CompareTableCell>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="compareUnlimited"
                      defaults="Unlimited"
                    />
                  </CompareTableCell>
                </tr>
              )}
              <tr>
                <CompareTableFeature>
                  <CompareTableFeatureName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="compareParticipants"
                      defaults="Participants"
                    />
                  </CompareTableFeatureName>
                  <CompareTableFeatureDescription>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="compareParticipantsDescription"
                      defaults="People who can vote on your polls"
                    />
                  </CompareTableFeatureDescription>
                </CompareTableFeature>
                <CompareTableCell>
                  <Trans
                    t={t}
                    ns="pricing"
                    i18nKey="compareUnlimited"
                    defaults="Unlimited"
                  />
                </CompareTableCell>
                <CompareTableCell>
                  <Trans
                    t={t}
                    ns="pricing"
                    i18nKey="compareUnlimited"
                    defaults="Unlimited"
                  />
                </CompareTableCell>
              </tr>
              <tr>
                <CompareTableFeature>
                  <CompareTableFeatureName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="comparePollRetention"
                      defaults="Poll retention"
                    />
                  </CompareTableFeatureName>
                  <CompareTableFeatureDescription>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="comparePollRetentionDescription"
                      defaults="How long polls are kept after their final date"
                    />
                  </CompareTableFeatureDescription>
                </CompareTableFeature>
                <CompareTableCell>
                  <Trans
                    t={t}
                    ns="pricing"
                    i18nKey="comparePollRetention30Days"
                    defaults="30 days"
                  />
                </CompareTableCell>
                <CompareTableCell>
                  <Trans
                    t={t}
                    ns="pricing"
                    i18nKey="comparePollRetentionIndefinite"
                    defaults="Indefinite"
                  />
                </CompareTableCell>
              </tr>
              <tr>
                <CompareTableFeature>
                  <CompareTableFeatureName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="duplicatePolls"
                      defaults="Duplicate polls"
                    />
                  </CompareTableFeatureName>
                  <CompareTableFeatureDescription>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="duplicatePollsDescription"
                      defaults="Create a new poll based on an existing one"
                    />
                  </CompareTableFeatureDescription>
                </CompareTableFeature>
                <CompareTableCell>
                  <CompareTableDash label={notIncluded} />
                </CompareTableCell>
                <CompareTableCell>
                  <CompareTableCheck label={included} />
                </CompareTableCell>
              </tr>
              <tr>
                <CompareTableFeature>
                  <CompareTableFeatureName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="advancedPollSettings"
                      defaults="Advanced poll settings"
                    />
                  </CompareTableFeatureName>
                  <CompareTableFeatureDescription>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="advancedPollSettingsPrivacyDescription"
                      defaults="Hide participant names and hide votes"
                    />
                  </CompareTableFeatureDescription>
                </CompareTableFeature>
                <CompareTableCell>
                  <CompareTableDash label={notIncluded} />
                </CompareTableCell>
                <CompareTableCell>
                  <CompareTableCheck label={included} />
                </CompareTableCell>
              </tr>
              <tr>
                <CompareTableFeature>
                  <CompareTableFeatureName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="emailInvites"
                      defaults="Email invites"
                    />
                  </CompareTableFeatureName>
                  <CompareTableFeatureDescription>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="emailInvitesDescription"
                      defaults="Track who opened and responded with personal invite links"
                    />
                  </CompareTableFeatureDescription>
                </CompareTableFeature>
                <CompareTableCell>
                  <CompareTableDash label={notIncluded} />
                </CompareTableCell>
                <CompareTableCell>
                  <CompareTableCheck label={included} />
                </CompareTableCell>
              </tr>
            </tbody>
            <tbody className="divide-y">
              <CompareTableSection icon={<UsersIcon aria-hidden="true" />}>
                <Trans
                  t={t}
                  ns="pricing"
                  i18nKey="compareTeam"
                  defaults="Team"
                />
              </CompareTableSection>
              <tr>
                <CompareTableFeature>
                  <CompareTableFeatureName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="teamCollaboration"
                      defaults="Team collaboration"
                    />
                  </CompareTableFeatureName>
                  <CompareTableFeatureDescription>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="teamCollaborationDescription"
                      defaults="Invite your team to manage polls together"
                    />
                  </CompareTableFeatureDescription>
                </CompareTableFeature>
                <CompareTableCell>
                  <CompareTableDash label={notIncluded} />
                </CompareTableCell>
                <CompareTableCell>
                  <CompareTableCheck label={included} />
                </CompareTableCell>
              </tr>
            </tbody>
            <tbody className="divide-y">
              <CompareTableSection icon={<PaletteIcon aria-hidden="true" />}>
                <Trans
                  t={t}
                  ns="pricing"
                  i18nKey="branding"
                  defaults="Branding"
                />
              </CompareTableSection>
              <tr>
                <CompareTableFeature>
                  <CompareTableFeatureName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="customBranding"
                      defaults="Custom branding"
                    />
                  </CompareTableFeatureName>
                  <CompareTableFeatureDescription>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="customBrandingDescription"
                      defaults="Show your logo and brand colors to your participants"
                    />
                  </CompareTableFeatureDescription>
                </CompareTableFeature>
                <CompareTableCell>
                  <CompareTableDash label={notIncluded} />
                </CompareTableCell>
                <CompareTableCell>
                  <CompareTableCheck label={included} />
                </CompareTableCell>
              </tr>
              <tr>
                <CompareTableFeature>
                  <CompareTableFeatureName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="removeAttribution"
                      defaults="Remove attribution"
                    />
                  </CompareTableFeatureName>
                  <CompareTableFeatureDescription>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="removeAttributionBenefitDescription"
                      defaults='Hide "Powered by Rallly" from your participants'
                    />
                  </CompareTableFeatureDescription>
                </CompareTableFeature>
                <CompareTableCell>
                  <CompareTableDash label={notIncluded} />
                </CompareTableCell>
                <CompareTableCell>
                  <CompareTableCheck label={included} />
                </CompareTableCell>
              </tr>
            </tbody>
            <tbody className="divide-y">
              <CompareTableSection icon={<BlocksIcon aria-hidden="true" />}>
                <Trans
                  t={t}
                  ns="pricing"
                  i18nKey="integrations"
                  defaults="Integrations"
                />
              </CompareTableSection>
              <tr>
                <CompareTableFeature>
                  <CompareTableFeatureName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="compareVideoCalls"
                      defaults="Video calls"
                    />
                  </CompareTableFeatureName>
                  <CompareTableFeatureDescription>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="compareVideoCallsDescription"
                      defaults="Add a meeting link to the invite when you pick a time"
                    />
                  </CompareTableFeatureDescription>
                </CompareTableFeature>
                <CompareTableCell>
                  <CompareTableCheck label={included} />
                </CompareTableCell>
                <CompareTableCell>
                  <CompareTableCheck label={included} />
                </CompareTableCell>
              </tr>
              <tr>
                <CompareTableFeature>
                  <CompareTableFeatureName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="apiAccess"
                      defaults="API access"
                    />
                  </CompareTableFeatureName>
                  <CompareTableFeatureDescription>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="apiAccessDescription"
                      components={{
                        a: <a className={faqLinkClassName} href={apiDocsUrl} />,
                      }}
                      defaults="Create polls and read results from your own systems. <a>Read the API docs</a>"
                    />
                  </CompareTableFeatureDescription>
                </CompareTableFeature>
                <CompareTableCell>
                  <CompareTableDash label={notIncluded} />
                </CompareTableCell>
                <CompareTableCell>
                  <CompareTableCheck label={included} />
                </CompareTableCell>
              </tr>
              <tr>
                <CompareTableFeature>
                  <CompareTableFeatureName>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="webhooks"
                      defaults="Webhooks"
                    />
                  </CompareTableFeatureName>
                  <CompareTableFeatureDescription>
                    <Trans
                      t={t}
                      ns="pricing"
                      i18nKey="webhooksDescription"
                      components={{
                        a: (
                          <a
                            className={faqLinkClassName}
                            href={webhooksDocsUrl}
                          />
                        ),
                      }}
                      defaults="Notify your own systems when polls and responses change. <a>Read the webhook docs</a>"
                    />
                  </CompareTableFeatureDescription>
                </CompareTableFeature>
                <CompareTableCell>
                  <CompareTableDash label={notIncluded} />
                </CompareTableCell>
                <CompareTableCell>
                  <CompareTableCheck label={included} />
                </CompareTableCell>
              </tr>
            </tbody>
          </CompareTable>
        </SectionContent>
      </Section>
      <div className="divide-y">
        <FaqSection
          locale={locale}
          title={
            <Trans
              t={t}
              ns="pricing"
              i18nKey="faq"
              defaults="Frequently asked questions"
            />
          }
        >
          <FaqItem
            question={
              <Trans
                t={t}
                ns="pricing"
                i18nKey="canUseFree"
                defaults="Can I use Rallly for free?"
              />
            }
          >
            {isOpenPollLimitEnabled ? (
              <Trans
                t={t}
                ns="pricing"
                i18nKey="canUseFreeAnswerOpenPollLimit"
                defaults="Yes. The free plan is not a trial. You can create as many polls as you like, with up to {count} open at a time, invite as many participants as you like, and use it for as long as you like without paying or adding a card. Paid plans add extra features such as unlimited open polls, keeping polls indefinitely and custom branding, but you will never be asked to pay to keep using the basics."
                values={{ count: FREE_OPEN_POLL_LIMIT }}
              />
            ) : (
              <Trans
                t={t}
                ns="pricing"
                i18nKey="canUseFreeAnswer3"
                defaults="Yes. The free plan is not a trial. You can create as many polls as you like, invite as many participants as you like, and use it for as long as you like without paying or adding a card. Paid plans add extra features such as keeping polls indefinitely and custom branding, but you will never be asked to pay to keep using the basics."
              />
            )}
          </FaqItem>
          <FaqItem
            question={
              <Trans
                t={t}
                ns="pricing"
                i18nKey="pollLimit"
                defaults="Is there a limit on how many polls I can create?"
              />
            }
          >
            {isOpenPollLimitEnabled ? (
              <Trans
                t={t}
                ns="pricing"
                i18nKey="pollLimitAnswerOpenPollLimit"
                defaults="There is no limit on the number of polls you can create or the number of people who can vote on them. On the free plan, up to {count} polls can be open and collecting votes at a time; finalize or close one to make room for another. Pro has no limit. On the free plan, polls are deleted once all their dates are more than 30 days in the past and there has been no activity for 30 days, and some features such as custom branding and advanced poll settings are only available on a paid plan. See the comparison table above for the full list."
                values={{ count: FREE_OPEN_POLL_LIMIT }}
              />
            ) : (
              <Trans
                t={t}
                ns="pricing"
                i18nKey="pollLimitAnswer"
                defaults="No. There is no limit on the number of polls you can create or the number of people who can vote on them, on any plan. On the free plan, polls are deleted once all their dates are more than 30 days in the past and there has been no activity for 30 days, and some features such as custom branding and advanced poll settings are only available on a paid plan. See the comparison table above for the full list."
              />
            )}
          </FaqItem>
          <FaqItem
            question={
              <Trans
                t={t}
                ns="pricing"
                i18nKey="whyUpgrade"
                defaults="Why should I upgrade?"
              />
            }
          >
            <Trans
              t={t}
              ns="pricing"
              i18nKey="whyUpgradeAnswer2"
              defaults="Upgrading to a paid plan makes sense if you use Rallly often or use it for work. The current subscription rate is a special early adopter rate and will increase in the future. By upgrading now, you will get early access to new, high-quality scheduling tools as they are released and lock in your subscription rate so you won't be affected by future price increases."
            />
          </FaqItem>
          <FaqItem
            question={
              <Trans
                t={t}
                ns="pricing"
                i18nKey="whenPollInactive"
                defaults="When does a poll become inactive?"
              />
            }
          >
            <Trans
              t={t}
              ns="pricing"
              i18nKey="whenPollInactiveAnswer"
              defaults="Polls become inactive when all date options are more than 30 days in the past and there has been no activity for 30 days. Activity includes new votes, comments, or changes to the poll. Inactive polls are automatically deleted if you do not have a paid subscription."
            />
          </FaqItem>
          <FaqItem
            question={
              <Trans
                t={t}
                ns="pricing"
                i18nKey="howToUpgrade"
                defaults="How do I upgrade to a paid plan?"
              />
            }
          >
            <Trans
              t={t}
              ns="pricing"
              i18nKey="howToUpgradeAnswer"
              components={{
                a: (
                  <Link
                    className={faqLinkClassName}
                    href={linkToApp("/settings/billing", {
                      ref: "pricing",
                      cta: "pricing_faq",
                    })}
                  />
                ),
                b: <strong />,
              }}
              defaults="To upgrade, you can go to your <a>billing settings</a> and click on <b>Upgrade</b>."
            />
          </FaqItem>
          <FaqItem
            question={
              <Trans
                t={t}
                ns="pricing"
                i18nKey="cancelSubscription"
                defaults="How do I cancel my subscription?"
              />
            }
          >
            <Trans
              t={t}
              ns="pricing"
              i18nKey="cancelSubscriptionAnswer"
              components={{
                a: (
                  <Link
                    className={faqLinkClassName}
                    href={linkToApp("/settings/billing", {
                      ref: "pricing",
                      cta: "pricing_faq",
                    })}
                  />
                ),
                b: <strong />,
              }}
              defaults="You can cancel your subscription at any time by going to your <a>billing settings</a>. Once you cancel your subscription, you will still have access to your paid plan until the end of your billing period. After that, you will be downgraded to a free plan."
            />
          </FaqItem>
          <FaqItem
            question={
              <Trans
                t={t}
                ns="home"
                i18nKey="faqDiscounts"
                defaults="Do you offer discounts for nonprofits or schools?"
              />
            }
          >
            <Trans
              t={t}
              ns="home"
              i18nKey="faqDiscountsAnswer"
              defaults="No. Rallly is priced to be affordable for small teams and organizations on tight budgets, so instead of offering discounts to some customers, we keep the price low for everyone. Charities, schools and community groups are also welcome to use the free plan for as long as they like."
            />
          </FaqItem>
          <FaqItem
            question={
              <Trans
                t={t}
                ns="home"
                i18nKey="faqTeams"
                defaults="How does Rallly work for teams?"
              />
            }
          >
            <Trans
              t={t}
              ns="home"
              i18nKey="faqTeamsAnswer"
              defaults="You can invite your team into a shared space where everyone creates and manages polls together. Billing is centralized. A single subscription covers the whole team, and you can add or remove seats as your team changes."
            />
          </FaqItem>
          <FaqItem
            question={
              <Trans
                t={t}
                ns="home"
                i18nKey="faqSelfHost"
                defaults="Can I self-host Rallly?"
              />
            }
          >
            <Trans
              t={t}
              ns="home"
              i18nKey="faqSelfHostAnswer"
              defaults="Yes. Rallly is open source and can be deployed on your own infrastructure with Docker. Check the <0>self-hosting docs</0> to get started."
              components={[
                <a
                  key="docs"
                  className={faqLinkClassName}
                  href="https://support.rallly.co/self-hosting/installation/docker"
                />,
              ]}
            />
          </FaqItem>
        </FaqSection>
        <Section className="sm:py-24">
          <Cta
            title={
              <Trans
                t={t}
                ns="pricing"
                i18nKey="pricingFinalCtaTitle"
                defaults="Get started for free"
              />
            }
            description={
              <Trans
                t={t}
                ns="pricing"
                i18nKey="pricingFinalCtaDescription"
                defaults="Create your first poll in under a minute. Upgrade when you need more."
              />
            }
            buttonLabel={
              <Trans
                t={t}
                ns="home"
                i18nKey="createAPoll"
                defaults="Create a poll"
              />
            }
            hint={
              <Trans
                t={t}
                ns="home"
                i18nKey="hint"
                defaults="It's free! No login required."
              />
            }
          />
        </Section>
      </div>
    </div>
  );
}

export async function generateMetadata(props: {
  params: Promise<{ locale: string }>;
}) {
  cacheLife("max");
  const { locale } = await props.params;
  const { t } = await getTranslation(locale, ["common", "pricing"]);
  return {
    alternates: getAlternates({ locale, path: "/pricing" }),
    title: t("pricingMetaTitle", {
      ns: "pricing",
      defaultValue: "Pricing: Free and Pro Plans",
    }),
    description: t("pricingDescription", {
      ns: "pricing",
    }),
  };
}