metamaps--metamaps/src/routes/Apps/AppsHeader.js

25 lines
754 B
JavaScript
Raw Normal View History

import React, { Component } from 'react'
2017-10-14 12:03:05 -04:00
import PropTypes from 'prop-types'
2018-03-10 08:29:08 -05:00
import NavBar from '../../components/NavBar'
import NavBarLink from '../../components/NavBarLink'
2018-03-10 08:25:18 -05:00
class AppsHeader extends Component {
render = () => {
const { currentUser } = this.props
return (
<NavBar>
2018-03-05 23:27:38 -05:00
{currentUser && currentUser.get('admin') && <NavBarLink show
2017-10-14 12:03:05 -04:00
matchChildRoutes href="/oauth/applications" linkClass="activeMaps"
text="Registered Apps" />}
2018-03-05 23:27:38 -05:00
<NavBarLink show matchChildRoutes
2017-10-14 12:03:05 -04:00
href="/oauth/authorized_applications"
linkClass="authedApps" text="Authorized Apps" />
2017-10-14 12:03:05 -04:00
<NavBarLink show href="/" linkClass="myMaps" text="Maps" />
</NavBar>
)
}
}
2018-03-10 08:25:18 -05:00
export default AppsHeader