Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Add FAQ

Blue Mouse3bab0b2e8a31
diff --git a/web/app/pages/Subscribe/Subscribe.tsx b/web/app/pages/Subscribe/Subscribe.tsx
index 781e94471..3aa027b16 100644
--- a/web/app/pages/Subscribe/Subscribe.tsx
+++ b/web/app/pages/Subscribe/Subscribe.tsx
@@ -5,7 +5,7 @@ import {
CheckIcon,
StarIcon,
} from '@phosphor-icons/react'
-import { useCallback, useEffect, useRef, useState } from 'react'
+import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { useFetcher, useNavigate, useLoaderData } from 'react-router'
import { toast } from 'sonner'
@@ -24,6 +24,7 @@ import { useAuth } from '~/providers/AuthProvider'
import { useTheme } from '~/providers/ThemeProvider'
import type { SubscribeLoaderData } from '~/routes/subscribe'
import Button from '~/ui/Button'
+import { FAQ } from '~/ui/FAQ'
import { Text } from '~/ui/Text'
import { Switch } from '~/ui/Switch'
import { cn } from '~/utils/generic'
@@ -186,6 +187,24 @@ const Subscribe = () => {
new Date(Date.now() + TRIAL_DAYS * 24 * 60 * 60 * 1000),
)
+ const faqItems = useMemo(() => {
+ const faqValues = {
+ lowestPlanEventsAmount:
+ PLAN_LIMITS['100k'].monthlyUsageLimit.toLocaleString('en-US'),
+ moderatePlanEventsAmount:
+ PLAN_LIMITS['500k'].monthlyUsageLimit.toLocaleString('en-US'),
+ }
+
+ return [0, 1, 4].map((idx) => ({
+ question: (
+ <Trans t={t} i18nKey={`main.faq.items.${idx}.q`} values={faqValues} />
+ ),
+ answer: (
+ <Trans t={t} i18nKey={`main.faq.items.${idx}.a`} values={faqValues} />
+ ),
+ }))
+ }, [t])
+
return (
<div className='flex min-h-screen flex-col items-center bg-gray-50 p-4 lg:p-8 dark:bg-slate-950'>
<div className='grid w-full max-w-5xl grid-cols-1 items-start gap-12 lg:grid-cols-[1fr_380px] lg:gap-16'>
@@ -422,6 +441,8 @@ const Subscribe = () => {
</Button>
)}
</div>
+
+ <FAQ items={faqItems} />
</div>
{/* Right Column (Timeline) */}