- Replace claims that contradicted the app: the default hotkey is Right Alt (hold to talk), local features are free with no daily cap, there is no 14-day trial, Team/SSO/SCIM/ZDR are not offered, and the repository is not public. Remove invented metrics, status badges, the competitor table, the ad-mediation changelog, the hash calculator and the duplicate demo. - Seven sections: hero with one labelled example, features, how it works, privacy, pricing (Free / Pro 2,900 / Pro+ 8,900 KRW a month), download, FAQ. Footer links the privacy policy, terms and account deletion pages. - All copy moves into i18n and every one of the 10 locales is translated. Pricing and cloud quotas come from site/src/pricing.ts. - Accessibility: skip link, labelled sections, aria-expanded with Esc and focus return for the menu, language list and FAQ, live status for the example, reduced-motion support, 44px targets, AA contrast on the primary button. Korean keep-all line breaking is scoped to :lang(ko) because Tailwind's break-keep blocked wrapping in Japanese and Chinese. - JS 111 -> 98 KB gzip, CSS 7.8 -> 5.2 KB gzip.
46 lines
1.9 KiB
TypeScript
46 lines
1.9 KiB
TypeScript
import { useState } from 'react'
|
|
import { Container } from '../components/Container'
|
|
import { SectionHeading } from '../components/SectionHeading'
|
|
import { PlusIcon } from '../components/icons'
|
|
import { useI18n } from '../i18n'
|
|
|
|
export function FAQ() {
|
|
const { t } = useI18n()
|
|
const [openIndex, setOpenIndex] = useState<number | null>(null)
|
|
|
|
return (
|
|
<section id="faq" aria-labelledby="faq-title" className="section border-t border-white/10 bg-surface-900/60">
|
|
<Container className="grid grid-cols-1 gap-12 lg:grid-cols-12 lg:gap-10">
|
|
<SectionHeading id="faq-title" title={t.faq.title} className="lg:col-span-4" />
|
|
|
|
<div className="border-b border-white/10 lg:col-span-8">
|
|
{t.faq.items.map((item, i) => {
|
|
const open = openIndex === i
|
|
const buttonId = `faq-q-${i}`
|
|
const panelId = `faq-a-${i}`
|
|
return (
|
|
<div key={item.q} className="border-t border-white/10">
|
|
<h3>
|
|
<button
|
|
id={buttonId}
|
|
type="button"
|
|
aria-expanded={open}
|
|
aria-controls={panelId}
|
|
onClick={() => setOpenIndex(open ? null : i)}
|
|
className="flex w-full items-start justify-between gap-6 py-5 text-left text-lg text-neutral-50 transition-colors hover:text-brand-blue-light"
|
|
>
|
|
<span className="keep-ko">{item.q}</span>
|
|
<PlusIcon className={`mt-1.5 h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform ${open ? 'rotate-45' : ''}`} />
|
|
</button>
|
|
</h3>
|
|
<div id={panelId} role="region" aria-labelledby={buttonId} hidden={!open}>
|
|
<p className="max-w-2xl keep-ko pb-6 text-base leading-relaxed text-neutral-300">{item.a}</p>
|
|
</div>
|
|
</div>
|
|
)
|
|
})}
|
|
</div>
|
|
</Container>
|
|
</section>
|
|
)
|
|
}
|