Skip to content

Commit d7c49fe

Browse files
committed
Refactor into AboutBox
1 parent e3dadd2 commit d7c49fe

File tree

2 files changed

+27
-20
lines changed

2 files changed

+27
-20
lines changed

web/components/about/box.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export function AboutBox(props: {
2+
title: string
3+
text: string
4+
}) {
5+
const {title, text} = props
6+
return (
7+
<div className="space-y-2">
8+
<h3 className="text-lg font-bold">{title}</h3>
9+
<p className="text-gray-600 dark:text-gray-400">
10+
{text}
11+
</p>
12+
</div>
13+
)
14+
}

web/pages/index.tsx

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {api} from 'web/lib/api'
2222
import {debounce, omit} from 'lodash'
2323
import {PREF_AGE_MAX, PREF_AGE_MIN,} from 'web/components/filters/location-filter'
2424
import {signupRedirect} from "web/lib/util/signup";
25+
import {AboutBox} from "web/components/about/box";
2526

2627

2728
export default function ProfilesPage() {
@@ -214,26 +215,18 @@ export default function ProfilesPage() {
214215
<div className="w-full bg-gray-50 dark:bg-gray-900 py-8 mt-20">
215216
<div className="max-w-6xl mx-auto px-4">
216217
<div className="grid md:grid-cols-3 gap-8 text-center">
217-
<div className="space-y-2">
218-
<h3 className="text-lg font-bold">Radically Transparent</h3>
219-
<p className="text-gray-600 dark:text-gray-400">
220-
No algorithms. Every profile searchable.
221-
</p>
222-
</div>
223-
224-
<div className="space-y-2">
225-
<h3 className="text-lg font-bold">Built for Depth</h3>
226-
<p className="text-gray-600 dark:text-gray-400">
227-
Filter by any keyword and what matters most.
228-
</p>
229-
</div>
230-
231-
<div className="space-y-2">
232-
<h3 className="text-lg font-bold">Community Owned</h3>
233-
<p className="text-gray-600 dark:text-gray-400">
234-
Free forever. Built by users, for users.
235-
</p>
236-
</div>
218+
<AboutBox
219+
title='Radically Transparent'
220+
text='No algorithms. Every profile searchable.'
221+
/>
222+
<AboutBox
223+
title='Built for Depth'
224+
text='Filter by any keyword and what matters most.'
225+
/>
226+
<AboutBox
227+
title='Community Owned'
228+
text='Free forever. Built by users, for users.'
229+
/>
237230
</div>
238231
</div>
239232
</div>

0 commit comments

Comments
 (0)