@@ -2,9 +2,10 @@ import { clsx } from "clsx"
22
33import { Button } from "@/app/conf/_design-system/button"
44import { Eyebrow } from "@/_design-system/eyebrow"
5-
5+ import { partition } from "@/app/conf/_design-system/utils/partition"
66import { TeaserSectionListItem } from "@/components/learn-aggregator/teaser-section-list-item"
77import {
8+ LearnPageItem ,
89 LearnPagePath ,
910 learnPages ,
1011} from "@/components/learn-aggregator/learn-pages"
@@ -27,6 +28,11 @@ export function DocsSection({
2728 const pages =
2829 docs ?. map ( path => learnPages [ path ] ) . filter ( page => page !== null ) ?? [ ]
2930
31+ const [ gettingStarted , bestPractices ] = partition (
32+ pages ,
33+ page => page . section === "getting-started" ,
34+ )
35+
3036 return (
3137 < section
3238 id = { sectionIds [ "docs" ] }
@@ -48,18 +54,40 @@ export function DocsSection({
4854 </ Button >
4955 </ header >
5056
51- < ul className = "grid grid-cols-1 gap-6 md:grid-cols-2" >
52- { pages . map ( ( page , index ) => (
53- < TeaserSectionListItem
54- key = { index }
55- title = { page . title }
56- description = { page . description }
57- icon = { < img src = { page . icon } alt = "" /> }
58- section = { page . section }
59- href = { page . href }
60- />
61- ) ) }
62- </ ul >
57+ { gettingStarted && (
58+ < >
59+ < h3 className = "typography-h3" > Getting Started</ h3 >
60+ < ul className = "grid grid-cols-1 gap-6 md:grid-cols-2" >
61+ { gettingStarted . map ( ( page , index ) => (
62+ < TeaserSectionListItem
63+ key = { index }
64+ title = { page . title }
65+ description = { page . description }
66+ icon = { < img src = { page . icon } alt = "" /> }
67+ section = { page . section }
68+ href = { page . href }
69+ />
70+ ) ) }
71+ </ ul >
72+ </ >
73+ ) }
74+ { bestPractices && (
75+ < >
76+ < h3 className = "typography-h3" > Best Practices</ h3 >
77+ < ul className = "grid grid-cols-1 gap-6 md:grid-cols-2" >
78+ { bestPractices . map ( ( page , index ) => (
79+ < TeaserSectionListItem
80+ key = { index }
81+ title = { page . title }
82+ description = { page . description }
83+ icon = { < img src = { page . icon } alt = "" /> }
84+ section = { page . section }
85+ href = { page . href }
86+ />
87+ ) ) }
88+ </ ul >
89+ </ >
90+ ) }
6391 </ section >
6492 )
6593}
0 commit comments