11import Container from '@/components/ui/container' ;
22import { FullLine } from '@/components/ui/full-line' ;
3+ import FaqList from '@/components/ui/faq-list' ;
34import SectionShell from '@/components/ui/section-shell' ;
45import { faqs as defaultFaqs , type FaqItem } from '@/data/faqs' ;
56
@@ -10,41 +11,19 @@ interface Props {
1011 headlineMuted ?: string ;
1112}
1213
13- function Column ( { items, className } : { items : FaqItem [ ] ; className ?: string } ) {
14- return (
15- < div className = { className } >
16- { items . map ( ( faq , i ) => (
17- < div
18- key = { faq . question }
19- className = { `p-6 sm:p-8 ${ i < items . length - 1 ? 'border-b border-rule' : '' } ` }
20- >
21- < h3 className = "text-base font-semibold text-foreground" > { faq . question } </ h3 >
22- < p className = "mt-2 text-sm leading-relaxed text-muted-foreground" > { faq . answer } </ p >
23- </ div >
24- ) ) }
25- </ div >
26- ) ;
27- }
2814
2915export default function FAQ ( {
3016 items = defaultFaqs ,
3117 headline = 'Questions people actually ask.' ,
3218 headlineMuted = 'Short answers.' ,
3319} : Props ) {
34- const mid = Math . ceil ( items . length / 2 ) ;
3520
3621 return (
3722 < SectionShell tier = "reference"
3823 tone = "raised" id = "faq" label = "FAQ" headline = { headline } headlineMuted = { headlineMuted } >
3924 < FullLine />
4025 < Container >
41- < div className = "grid grid-cols-1 md:grid-cols-2" >
42- < Column
43- items = { items . slice ( 0 , mid ) }
44- className = "border-b border-rule md:border-r md:border-b-0"
45- />
46- < Column items = { items . slice ( mid ) } />
47- </ div >
26+ < FaqList items = { items } />
4827 </ Container >
4928 < FullLine />
5029 </ SectionShell >
0 commit comments