import React from 'react';
import NavLink from 'react-router-dom/NavLink';
import { FormattedMessage } from 'react-intl';
const links = [
,
,
,
,
,
,
];
export function getPreviousLink (path) {
const index = links.findIndex(link => link.props.to === path);
if (index > 0) {
return links[index - 1].props.to;
}
return null;
};
export function getNextLink (path) {
const index = links.findIndex(link => link.props.to === path);
if (index !== -1 && index < links.length - 1) {
return links[index + 1].props.to;
}
return null;
};
class TabsBar extends React.Component {
render () {
return (
{React.Children.toArray(links)}
);
}
}
export default TabsBar;