@@ -5,23 +5,80 @@ import { toSlug } from '../../utils/slug'
5
5
6
6
interface Props {
7
7
title : string
8
- questions : string
8
+ gettingStartedQuestions : string
9
+ generalQuestions : string
10
+ bestPracticesQuestions : string
11
+ specificationQuestions : string
12
+ frontendQuestions : string
9
13
rawMarkdownBody : string
10
14
}
11
15
12
- const index = ( { title, questions , rawMarkdownBody } : Props ) => {
16
+ const index = ( { title, gettingStartedQuestions , generalQuestions , bestPracticesQuestions , specificationQuestions , frontendQuestions , rawMarkdownBody } : Props ) => {
13
17
return (
14
18
< section >
15
19
< div className = "documentationContent" >
16
20
< div className = "inner-content" >
17
21
< h1 > { title } </ h1 >
18
- { questions && (
22
+ { gettingStartedQuestions && (
19
23
< div >
20
- { questions
24
+ < h2 > Getting Started</ h2 >
25
+ { gettingStartedQuestions
21
26
. split ( ',' )
22
- . map ( question => (
23
- < Link className = "faq-questions" key = { question } to = { `#${ toSlug ( question ) } ` } >
24
- { question }
27
+ . map ( gettingStartedQuestion => (
28
+ < Link className = "faq-questions" key = { gettingStartedQuestion } to = { `#${ toSlug ( gettingStartedQuestion ) } ` } >
29
+ { gettingStartedQuestion }
30
+ </ Link >
31
+ ) )
32
+ }
33
+ </ div >
34
+ ) }
35
+ { generalQuestions && (
36
+ < div >
37
+ < h2 > General</ h2 >
38
+ { generalQuestions
39
+ . split ( ',' )
40
+ . map ( generalQuestion => (
41
+ < Link className = "faq-questions" key = { generalQuestion } to = { `#${ toSlug ( generalQuestion ) } ` } >
42
+ { generalQuestion }
43
+ </ Link >
44
+ ) )
45
+ }
46
+ </ div >
47
+ ) }
48
+ { bestPracticesQuestions && (
49
+ < div >
50
+ < h2 > Best Practices</ h2 >
51
+ { bestPracticesQuestions
52
+ . split ( ',' )
53
+ . map ( bestPracticesQuestion => (
54
+ < Link className = "faq-questions" key = { bestPracticesQuestion } to = { `#${ toSlug ( bestPracticesQuestion ) } ` } >
55
+ { bestPracticesQuestion }
56
+ </ Link >
57
+ ) )
58
+ }
59
+ </ div >
60
+ ) }
61
+ { specificationQuestions && (
62
+ < div >
63
+ < h2 > Specification</ h2 >
64
+ { specificationQuestions
65
+ . split ( ',' )
66
+ . map ( specificationQuestion => (
67
+ < Link className = "faq-questions" key = { specificationQuestion } to = { `#${ toSlug ( specificationQuestion ) } ` } >
68
+ { specificationQuestion }
69
+ </ Link >
70
+ ) )
71
+ }
72
+ </ div >
73
+ ) }
74
+ { frontendQuestions && (
75
+ < div >
76
+ < h2 > Frontend</ h2 >
77
+ { frontendQuestions
78
+ . split ( ',' )
79
+ . map ( frontendQuestion => (
80
+ < Link className = "faq-questions" key = { frontendQuestion } to = { `#${ toSlug ( frontendQuestion ) } ` } >
81
+ { frontendQuestion }
25
82
</ Link >
26
83
) )
27
84
}
0 commit comments