2018-07-11 14:59:01 +02:00
|
|
|
//@flow
|
|
|
|
|
import React from "react";
|
2018-07-24 14:36:14 +02:00
|
|
|
import { translate } from "react-i18next";
|
2018-07-11 14:59:01 +02:00
|
|
|
import PrimaryNavigationLink from "./PrimaryNavigationLink";
|
|
|
|
|
|
2018-07-24 14:36:14 +02:00
|
|
|
type Props = {
|
|
|
|
|
t: string => string
|
|
|
|
|
};
|
2018-07-11 21:01:29 +02:00
|
|
|
|
2018-07-11 14:59:01 +02:00
|
|
|
class PrimaryNavigation extends React.Component<Props> {
|
|
|
|
|
render() {
|
2018-07-24 14:36:14 +02:00
|
|
|
const { t } = this.props;
|
2018-07-11 14:59:01 +02:00
|
|
|
return (
|
|
|
|
|
<nav className="tabs is-boxed">
|
|
|
|
|
<ul>
|
2018-07-24 16:25:01 +02:00
|
|
|
<PrimaryNavigationLink
|
|
|
|
|
to="/"
|
|
|
|
|
activeOnlyWhenExact={true}
|
|
|
|
|
label={t("primary-navigation.repositories")}
|
|
|
|
|
/>
|
2018-07-24 14:36:14 +02:00
|
|
|
<PrimaryNavigationLink
|
|
|
|
|
to="/users"
|
|
|
|
|
label={t("primary-navigation.users")}
|
|
|
|
|
/>
|
|
|
|
|
<PrimaryNavigationLink
|
|
|
|
|
to="/logout"
|
|
|
|
|
label={t("primary-navigation.logout")}
|
|
|
|
|
/>
|
2018-07-11 14:59:01 +02:00
|
|
|
</ul>
|
|
|
|
|
</nav>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-07-24 14:36:14 +02:00
|
|
|
export default translate("commons")(PrimaryNavigation);
|