mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 09:35:48 +00:00
20c8899b31
Summary: This reverts commit 4a7f2192f9cf95f0c8fa4b0742eb472c13ee2859. Adding the link breaks mobile Closes https://github.com/facebook/react-native/pull/7520 Differential Revision: D3290347 Pulled By: JoelMarcey fbshipit-source-id: 950db67eb14b5fe8816d4c782b32d233a8697ae7
59 lines
1.6 KiB
JavaScript
59 lines
1.6 KiB
JavaScript
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*
|
|
* @providesModule HeaderLinks
|
|
*/
|
|
|
|
var React = require('React');
|
|
var AlgoliaDocSearch = require('AlgoliaDocSearch');
|
|
|
|
var HeaderLinks = React.createClass({
|
|
linksInternal: [
|
|
{section: 'docs', href: 'docs/getting-started.html', text: 'Docs'},
|
|
{section: 'support', href: 'support.html', text: 'Support'},
|
|
{section: 'showcase', href: 'showcase.html', text: 'Showcase'},
|
|
{section: 'blog', href: 'blog/', text: 'Blog'},
|
|
],
|
|
linksExternal: [
|
|
{section: 'github', href: 'https://github.com/facebook/react-native', text: 'GitHub'},
|
|
{section: 'react', href: 'http://facebook.github.io/react', text: 'React'},
|
|
],
|
|
|
|
makeLinks: function(links) {
|
|
return links.map(function(link) {
|
|
return (
|
|
<li key={link.section}>
|
|
<a
|
|
href={link.href}
|
|
className={link.section === this.props.section ? 'active' : ''}>
|
|
{link.text}
|
|
</a>
|
|
</li>
|
|
);
|
|
}, this);
|
|
},
|
|
|
|
render: function() {
|
|
return (
|
|
<div className="nav-site-wrapper">
|
|
<ul className="nav-site nav-site-internal">
|
|
{this.makeLinks(this.linksInternal)}
|
|
</ul>
|
|
|
|
<AlgoliaDocSearch />
|
|
|
|
<ul className="nav-site nav-site-external">
|
|
{this.makeLinks(this.linksExternal)}
|
|
</ul>
|
|
</div>
|
|
);
|
|
}
|
|
});
|
|
|
|
module.exports = HeaderLinks;
|