@@ -18,11 +18,12 @@ import { QuestionSections } from '@/app/(landing)/comparisons/components/questio
1818import { getLibraryPostsForCompetitor } from '@/app/(landing)/comparisons/library-links'
1919import {
2020 ALL_COMPETITORS ,
21- betterThanQuestion ,
21+ answersQuestionsInPlace ,
2222 buildBottomLine ,
2323 buildComparisonFaqs ,
2424 getCompetitorBySlug ,
2525 getLatestVerifiedDate ,
26+ getQuestionSectionGroups ,
2627 SIM_LATEST_VERIFIED ,
2728} from '@/app/(landing)/comparisons/utils'
2829import { BackLink , ContentRelatedPosts } from '@/app/(landing)/components'
@@ -96,6 +97,13 @@ export default async function ComparisonProviderPage({
9697 }
9798
9899 const faqs = buildComparisonFaqs ( competitor )
100+ const questionGroups = getQuestionSectionGroups ( competitor )
101+ const { lead } = questionGroups
102+ const leadAnswer = competitor . leadAnswer ? (
103+ < p className = 'max-w-[720px] text-[var(--text-body)] text-sm leading-[150%] tracking-[0.02em] lg:text-base' >
104+ < ProseText prose = { competitor . leadAnswer } />
105+ </ p >
106+ ) : null
99107 const relatedPosts = await getLibraryPostsForCompetitor ( competitor )
100108 const verdict = buildBottomLine ( competitor )
101109 const CompetitorIcon = competitor . brand ?. icon
@@ -200,7 +208,7 @@ export default async function ComparisonProviderPage({
200208 >
201209 Sim vs { competitor . name }
202210 </ h1 >
203- { competitor . leadQuestion && competitor . leadAnswer ? (
211+ { lead ? (
204212 < section
205213 id = 'lead-question'
206214 aria-labelledby = 'lead-question-heading'
@@ -210,31 +218,19 @@ export default async function ComparisonProviderPage({
210218 id = 'lead-question-heading'
211219 className = 'max-w-[720px] text-balance text-[var(--text-primary)] text-xl leading-[120%] tracking-[-0.02em] lg:text-2xl'
212220 >
213- { competitor . leadQuestion }
221+ { lead . question }
214222 </ h2 >
215- < p className = 'max-w-[720px] text-[var(--text-body)] text-sm leading-[150%] tracking-[0.02em] lg:text-base' >
216- < ProseText prose = { competitor . leadAnswer } />
217- </ p >
218- < p className = 'max-w-[720px] text-[var(--text-muted)] text-sm leading-[150%] tracking-[0.02em] lg:text-base' >
219- Every fact below is sourced and dated, last verified { verifiedDate } .
220- </ p >
223+ { leadAnswer }
221224 </ section >
222225 ) : (
223- < >
224- { competitor . leadAnswer ? (
225- < p className = 'max-w-[720px] text-[var(--text-body)] text-sm leading-[150%] tracking-[0.02em] lg:text-base' >
226- < ProseText prose = { competitor . leadAnswer } />
227- </ p >
228- ) : null }
229- < p className = 'max-w-[720px] text-[var(--text-muted)] text-sm leading-[150%] tracking-[0.02em] lg:text-base' >
230- Sim is the open-source AI workspace where teams build, deploy, and manage AI
231- agents visually, conversationally, or with code. Here is how Sim compares to{ ' ' }
232- { competitor . name } on platform architecture, AI capabilities, integrations,
233- pricing, security, and support. Every fact below is sourced and dated, last
234- verified { verifiedDate } .
235- </ p >
236- </ >
226+ leadAnswer
237227 ) }
228+ < p className = 'max-w-[720px] text-[var(--text-muted)] text-sm leading-[150%] tracking-[0.02em] lg:text-base' >
229+ { lead
230+ ? null
231+ : `Sim is the open-source AI workspace where teams build, deploy, and manage AI agents visually, conversationally, or with code. Here is how Sim compares to ${ competitor . name } on platform architecture, AI capabilities, integrations, pricing, security, and support. ` }
232+ Every fact below is sourced and dated, last verified { verifiedDate } .
233+ </ p >
238234 < p className = 'sr-only' >
239235 Sim is an open-source AI workspace for building, deploying, and managing AI agents.
240236 This page compares Sim to { competitor . name } across platform architecture, AI
@@ -254,25 +250,7 @@ export default async function ComparisonProviderPage({
254250 < div className = 'h-px w-full bg-[var(--border)]' />
255251 </ >
256252 ) : null }
257- { competitor . betterThanAnswer ? (
258- < >
259- < section aria-labelledby = 'better-than-heading' className = 'px-6 py-10' >
260- < h2
261- id = 'better-than-heading'
262- className = 'mb-4 text-[var(--text-primary)] text-xl leading-[100%] tracking-[-0.02em] lg:text-2xl'
263- >
264- { betterThanQuestion ( competitor ) }
265- </ h2 >
266- < p className = 'max-w-[720px] text-[var(--text-body)] text-small leading-[150%]' >
267- < ProseText prose = { competitor . betterThanAnswer } />
268- </ p >
269- </ section >
270- < div className = 'h-px w-full bg-[var(--border)]' />
271- </ >
272- ) : null }
273- { competitor . questions ?. intro ? (
274- < QuestionSections questions = { competitor . questions . intro } idPrefix = 'intro-question' />
275- ) : null }
253+ < QuestionSections questions = { questionGroups . opening } idPrefix = 'opening-question' />
276254 < div className = 'grid grid-cols-1 sm:grid-cols-2' >
277255 < section
278256 aria-labelledby = 'what-is-sim-heading'
@@ -318,12 +296,7 @@ export default async function ComparisonProviderPage({
318296 < div className = 'h-px w-full bg-[var(--border)]' />
319297 </ >
320298 ) : null }
321- { competitor . questions ?. glance ? (
322- < QuestionSections
323- questions = { competitor . questions . glance }
324- idPrefix = 'glance-question'
325- />
326- ) : null }
299+ < QuestionSections questions = { questionGroups . glance } idPrefix = 'glance-question' />
327300
328301 < section aria-labelledby = 'comparison-table-heading' className = 'px-6 pt-10 pb-4' >
329302 < h2
@@ -396,12 +369,7 @@ export default async function ComparisonProviderPage({
396369
397370 < div className = 'h-px w-full bg-[var(--border)]' />
398371
399- { competitor . questions ?. closing ? (
400- < QuestionSections
401- questions = { competitor . questions . closing }
402- idPrefix = 'closing-question'
403- />
404- ) : null }
372+ < QuestionSections questions = { questionGroups . closing } idPrefix = 'closing-question' />
405373
406374 < section aria-labelledby = 'bottom-line-heading' className = 'px-6 py-10' >
407375 < h2
@@ -458,7 +426,7 @@ export default async function ComparisonProviderPage({
458426 </ ul >
459427 </ section >
460428
461- { competitor . questions ? null : (
429+ { answersQuestionsInPlace ( competitor ) ? null : (
462430 < section aria-labelledby = 'faq-heading' className = 'px-6 py-10' >
463431 < h2
464432 id = 'faq-heading'
0 commit comments