Branchwell

Jotley / website · jotley.ai / src / app / compare / page.tsx

1import Link from 'next/link';
2import { COMPARE } from '@/lib/compare';
3import { pageMetadata } from '@/lib/site-metadata';
4import { COMPARE_STRUCTURED_DATA, jsonLd } from '@/lib/site-structured-data';
5import '../components/home/home.css';
6import SiteHeader from '../components/SiteHeader';
7import SiteFooter from '../components/SiteFooter';
8
9export const metadata = pageMetadata('compare');
10
11export default function ComparePage() {
12 const { heading, lead, intro, columns, rows, picks, faqs, sources, checked } = COMPARE;
13
14 return (
15 <div className="jt-home flex min-h-screen flex-col" data-testid="page-surface">
16 <script type="application/ld+json" dangerouslySetInnerHTML={jsonLd(COMPARE_STRUCTURED_DATA)} />
17 <SiteHeader />
18 <main className="page-main">
19 <div className="page-wrap compare-page-wrap">
20 <header className="page-hero">
21 <h1>{heading}</h1>
22 <p className="sub">{lead}</p>
23 </header>
24
25 <section className="content-card" aria-labelledby="compare-differ-title">
26 <h2 id="compare-differ-title">How they differ</h2>
27 <p>{intro}</p>
28 <div className="compare-scroll" role="region" aria-labelledby="compare-differ-title" tabIndex={0}>
29 <table className="compare-table">
30 <thead>
31 <tr>
32 <td />
33 {columns.map((name) => <th scope="col" key={name}>{name}</th>)}
34 </tr>
35 </thead>
36 <tbody>
37 {rows.map(([label, ...cells]) => (
38 <tr key={label}>
39 <th scope="row">{label}</th>
40 {cells.map((cell, index) => <td key={columns[index]}>{cell}</td>)}
41 </tr>
42 ))}
43 </tbody>
44 </table>
45 </div>
46 </section>
47
48 <section className="content-card" aria-labelledby="compare-choose-title">
49 <h2 id="compare-choose-title">Which one to choose</h2>
50 {picks.map(([when, why]) => <p key={when}><strong>{when}</strong> {why}</p>)}
51 <p><Link href="/download">Download Jotley for Mac</Link>, or <a href="https://testflight.apple.com/join/1y7UFzjK" target="_blank" rel="noopener noreferrer">join the TestFlight beta</a> for iPhone and iPad.</p>
52 </section>
53
54 <section className="content-card" aria-labelledby="compare-questions-title">
55 <h2 id="compare-questions-title">Common questions</h2>
56 {faqs.map(({ q, a }) => (
57 <div className="compare-question" key={q}>
58 <h3>{q}</h3>
59 <p>{a}</p>
60 </div>
61 ))}
62 </section>
63
64 <section className="content-card" aria-labelledby="compare-sources-title">
65 <h2 id="compare-sources-title">Sources</h2>
66 <p>
67 Facts about the other products come from their own pages, read on {checked}. Products change, so check
68 their pages for the latest. Jotley’s own details are on the <Link href="/">home page</Link> and
69 in <Link href="/help">Help</Link>.
70 </p>
71 <ul>
72 {sources.map(([label, href]) => <li key={href}><a href={href}>{label}</a></li>)}
73 </ul>
74 </section>
75 </div>
76 </main>
77 <SiteFooter />
78 </div>
79 );
80}