mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 14:10:04 +02:00
refactoring - created DumbTab for non routable tab
This commit is contained in:
parent
dcc410bc17
commit
ea4b959c89
@ -81,6 +81,20 @@ const ManageTab = styled(Tab)`
|
||||
`}
|
||||
`;
|
||||
|
||||
const DumbTab = ({
|
||||
children
|
||||
}) => (
|
||||
<NavLi activeClassName='active' to='#'>{({
|
||||
isActive
|
||||
}) =>
|
||||
<NavigationLinkContainer className={isActive ? 'active' : ''}>
|
||||
<OrgName>
|
||||
{children}
|
||||
</OrgName>
|
||||
</NavigationLinkContainer>
|
||||
}</NavLi>
|
||||
);
|
||||
|
||||
const OrgNavigation = ({
|
||||
orgs = []
|
||||
}) => {
|
||||
@ -116,27 +130,11 @@ const OrgNavigation = ({
|
||||
});
|
||||
|
||||
const manageTabs = () => (
|
||||
<NavLi activeClassName='active' to='#'>{({
|
||||
isActive
|
||||
}) =>
|
||||
<NavigationLinkContainer className={isActive ? 'active' : ''}>
|
||||
<OrgName>
|
||||
Manage Tabs ({orgs.length})
|
||||
</OrgName>
|
||||
</NavigationLinkContainer>
|
||||
}</NavLi>
|
||||
<DumbTab>Manage Tabs ({orgs.length})</DumbTab>
|
||||
);
|
||||
|
||||
const addOrgTab = () => (
|
||||
<NavLi activeClassName='active' to='#'>{({
|
||||
isActive
|
||||
}) =>
|
||||
<NavigationLinkContainer className={isActive ? 'active' : ''}>
|
||||
<OrgName>
|
||||
+ Add organisation
|
||||
</OrgName>
|
||||
</NavigationLinkContainer>
|
||||
}</NavLi>
|
||||
<DumbTab>+ Add organisation</DumbTab>
|
||||
);
|
||||
|
||||
return (
|
||||
@ -157,6 +155,10 @@ OrgNavigation.propTypes = {
|
||||
orgs: React.PropTypes.arrayOf(PropTypes.org)
|
||||
};
|
||||
|
||||
DumbTab.propTypes = {
|
||||
children: React.PropTypes.node
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
orgs: orgsSelector(state)
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user