@@ -12,6 +12,7 @@ import FooterNav from './FooterNav';
12
12
import MetaTitle from 'templates/components/MetaTitle' ;
13
13
import React from 'react' ;
14
14
import { colors , media } from 'theme' ;
15
+ import { sectionListCommunity , sectionListDocs } from 'utils/sectionList' ;
15
16
16
17
import ossLogoPng from 'images/oss_logo.png' ;
17
18
@@ -60,17 +61,27 @@ const Footer = ({layoutHasSidebar = false}: {layoutHasSidebar: boolean}) => (
60
61
} } >
61
62
< FooterNav layoutHasSidebar = { layoutHasSidebar } >
62
63
< MetaTitle onDark = { true } > Docs</ MetaTitle >
63
- < FooterLink to = "/docs/hello-world.html" > Quick Start</ FooterLink >
64
- < FooterLink to = "/docs/thinking-in-react.html" >
65
- Thinking in React
66
- </ FooterLink >
67
- < FooterLink to = "/tutorial/tutorial.html" > Tutorial</ FooterLink >
68
- < FooterLink to = "/docs/jsx-in-depth.html" >
69
- Advanced Guides
70
- </ FooterLink >
64
+ { sectionListDocs . map ( section => {
65
+ // Skip the Installation page for Quick Start
66
+ const defaultItem =
67
+ section . items [ 0 ] . id === 'installation'
68
+ ? section . items [ 1 ] . id
69
+ : section . items [ 0 ] . id ;
70
+ return (
71
+ < FooterLink to = { `/docs/${ defaultItem } .html` } >
72
+ { section . title }
73
+ </ FooterLink >
74
+ ) ;
75
+ } ) }
71
76
</ FooterNav >
72
77
< FooterNav layoutHasSidebar = { layoutHasSidebar } >
73
- < MetaTitle onDark = { true } > Community</ MetaTitle >
78
+ < MetaTitle onDark = { true } > Channels</ MetaTitle >
79
+ < ExternalFooterLink
80
+ href = "https://github.com/facebook/react"
81
+ target = "_blank"
82
+ rel = "noopener" >
83
+ GitHub
84
+ </ ExternalFooterLink >
74
85
< ExternalFooterLink
75
86
href = "http://stackoverflow.com/questions/tagged/reactjs"
76
87
target = "_blank"
@@ -103,34 +114,26 @@ const Footer = ({layoutHasSidebar = false}: {layoutHasSidebar: boolean}) => (
103
114
</ ExternalFooterLink >
104
115
</ FooterNav >
105
116
< FooterNav layoutHasSidebar = { layoutHasSidebar } >
106
- < MetaTitle onDark = { true } > Resources</ MetaTitle >
107
- < FooterLink to = "/community/conferences.html" >
108
- Conferences
109
- </ FooterLink >
110
- < FooterLink to = "/community/videos.html" > Videos</ FooterLink >
111
- < FooterLink to = "/community/examples.html" > Examples</ FooterLink >
112
- < FooterLink to = "/community/debugging-tools.html" >
113
- Complementary Tools
114
- </ FooterLink >
117
+ < MetaTitle onDark = { true } > Community</ MetaTitle >
118
+ { sectionListCommunity . map ( section => (
119
+ < FooterLink to = { `/community/${ section . items [ 0 ] . id } .html` } >
120
+ { section . title }
121
+ </ FooterLink >
122
+ ) ) }
115
123
</ FooterNav >
116
124
< FooterNav layoutHasSidebar = { layoutHasSidebar } >
117
125
< MetaTitle onDark = { true } > More</ MetaTitle >
126
+ < FooterLink to = "/tutorial/tutorial.html" > Tutorial</ FooterLink >
118
127
< FooterLink to = "/blog/" > Blog</ FooterLink >
119
- < ExternalFooterLink
120
- href = "https://github.com/facebook/react"
121
- target = "_blank"
122
- rel = "noopener" >
123
- GitHub
124
- </ ExternalFooterLink >
128
+ < FooterLink to = "/acknowledgements.html" >
129
+ Acknowledgements
130
+ </ FooterLink >
125
131
< ExternalFooterLink
126
132
href = "http://facebook.github.io/react-native/"
127
133
target = "_blank"
128
134
rel = "noopener" >
129
135
React Native
130
136
</ ExternalFooterLink >
131
- < FooterLink to = "/acknowledgements.html" >
132
- Acknowledgements
133
- </ FooterLink >
134
137
</ FooterNav >
135
138
</ div >
136
139
< section
0 commit comments