Created
July 4, 2017 13:26
-
-
Save SergProduction/79a10506009455f0d2a9c63f1e01521c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import PropTypes from 'prop-types' | |
import injectSheet from 'react-jss' | |
import { connect } from 'react-redux' | |
import { compose } from 'redux' | |
import shared from '../../lib/shared-var' | |
const styles = { | |
} | |
const enhance = compose( | |
connect(), | |
injectSheet(styles) | |
) | |
const LeftLislData = ({ lang, androidApk, iphone, oldlink }) => ([ | |
{ | |
link: `http://${window.location.hostname}/access/`, | |
text: lang['1mXZFwU'], | |
}, | |
{ | |
link: `http://${androidApk}`, | |
text: 'Android', | |
}, | |
{ | |
link: iphone, | |
text: 'iphone', | |
}, | |
{ | |
link: `http://${oldlink}/?utm_medium=refer&utm_source=newsite`, | |
text: 'Вернуться на старый сайт', | |
}, | |
]) | |
const LeftLislView = data => ( | |
<ul> | |
{data.map(el => ( | |
<li key={el.link}> | |
<a href={el.link} target="_blank"> | |
{el.text} | |
</a> | |
</li> | |
))} | |
</ul> | |
) | |
const RightLisl = () => ( | |
<ul> | |
</ul> | |
) | |
class HeaderInfo extends Component { | |
render() { | |
const { lang, mirror, env } = shared.getFull() | |
return ( | |
<hgroup className="header-info"> | |
<nav> | |
{LeftLislView( | |
LeftLislData({ | |
lang, | |
androidApk: mirror.apk, | |
iphone: env.props.iphone, | |
oldlink: mirror.domain, | |
}) | |
)} | |
</nav> | |
<nav> | |
{RightLisl()} | |
</nav> | |
</hgroup> | |
) | |
} | |
} | |
export default enhance(HeaderInfo) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment