Browse Source
* Move footer and header links into a YAML file * Import header and footer nav YAML files directly - Remove them from section list - Add keys to nav array items when mapping * Add flow error supression for YAML importsmain
Gasim Gasimzada
5 years ago
committed by
Nat Alison
5 changed files with 103 additions and 78 deletions
@ -0,0 +1,43 @@ |
|||
community: |
|||
title: Community |
|||
|
|||
docs: |
|||
title: Docs |
|||
|
|||
more: |
|||
title: More |
|||
items: |
|||
- title: Tutorial |
|||
to: /tutorial/tutorial.html |
|||
- title: Blog |
|||
to: /blog |
|||
- title: Acknowledgements |
|||
to: /acknowledgements.html |
|||
- title: React Native |
|||
to: https://facebook.github.io/react-native/ |
|||
external: true |
|||
|
|||
channels: |
|||
title: Channels |
|||
items: |
|||
- title: Github |
|||
to: https://github.com/facebook/react |
|||
external: true |
|||
- title: Stack Overflow |
|||
to: https://stackoverflow.com/questions/tagged/reactjs |
|||
external: true |
|||
- title: Discussion Forums |
|||
to: https://reactjs.org/community/support.html#popular-discussion-forums |
|||
external: true |
|||
- title: Reactiflux Chat |
|||
to: https://discord.gg/0ZcbPKXt5bZjGY5n |
|||
external: true |
|||
- title: DEV Community |
|||
to: https://dev.to/t/react |
|||
external: true |
|||
- title: Facebook |
|||
to: https://www.facebook.com/react |
|||
external: true |
|||
- title: Twitter |
|||
to: https://twitter.com/reactjs |
|||
external: true |
@ -0,0 +1,13 @@ |
|||
items: |
|||
- title: Docs |
|||
to: /docs/getting-started.html |
|||
activeSelector: /docs/ |
|||
- title: Tutorial |
|||
to: /tutorial/tutorial.html |
|||
activeSelector: /tutorial |
|||
- title: Blog |
|||
to: /blog/ |
|||
activeSelector: /blog |
|||
- title: Community |
|||
to: /community/support.html |
|||
activeSelector: /community |
@ -0,0 +1,26 @@ |
|||
import React from 'react'; |
|||
import ExternalFooterLink from './ExternalFooterLink'; |
|||
import FooterLink from './FooterLink'; |
|||
|
|||
const SectionLinks = ({links}: Props) => |
|||
links.map(item => { |
|||
if (item.external) { |
|||
return ( |
|||
<ExternalFooterLink |
|||
key={item.title} |
|||
href={item.to} |
|||
target="_blank" |
|||
rel="noopener"> |
|||
{item.title} |
|||
</ExternalFooterLink> |
|||
); |
|||
} |
|||
|
|||
return ( |
|||
<FooterLink key={item.title} to={item.to}> |
|||
{item.title} |
|||
</FooterLink> |
|||
); |
|||
}); |
|||
|
|||
export default SectionLinks; |
Loading…
Reference in new issue