Permitting external links and removing useless "back to corporate" link

This commit is contained in:
Unknown committed 2018-11-08 18:46:04 +01:00
1 parent 1575d0b323
commit e1a646d99f
2 files changed
+10 -11

No files matched your search

+4 -4
View File
@@ -12,7 +12,7 @@ const usersMenus = {
{ title: 'Your profile', to: '/users/user', icon: Search },
{ title: 'Directory', to: '/users/browse', icon: GamepadRounded },
{ title: 'Search', to: '/users/search', icon: AccessibilityNew },
{ title: 'Report', to: '/report/users', icon: LibraryAdd }
{ title: 'Report', to: 'https://github.com/AdvancedAlgos/UsersModule/issues/new', icon: LibraryAdd, externalLink: true }
]
}
@@ -24,7 +24,7 @@ const teamsMenus = {
{ title: 'Your teams', to: '/teams/manage-teams', icon: GamepadRounded },
{ title: 'Team members', to: '/teams/team-members', icon: GamepadRounded },
{ title: 'Financial beings', to: '/teams/financial-beings', icon: GamepadRounded },
{ title: 'Report', to: '/report/teams', icon: LibraryAdd }
{ title: 'Report', to: 'https://github.com/AdvancedAlgos/TeamsModule/issues/new', icon: LibraryAdd, externalLink: true }
]
}
@@ -36,7 +36,7 @@ const eventsMenus = {
{ title: 'Your events', to: '/events/my', icon: GamepadRounded },
{ title: 'Your hosted events', to: '/events/host', icon: AccessibilityNew },
{ title: 'Host an event', to: '/events/create', icon: LibraryAdd },
{ title: 'Report', to: '/report/events', icon: LibraryAdd }
{ title: 'Report', to: 'https://github.com/AdvancedAlgos/UsersModule/issues/new', icon: LibraryAdd, externalLink: true }
]
}
@@ -46,7 +46,7 @@ const keyvaultMenus = {
submenus: [
{ title: 'Manage keys', to: '/key-vault/browse', icon: Search },
{ title: 'Add key', to: '/key-vault/addKey', icon: GamepadRounded },
{ title: 'Report', to: '/report/key-vault', icon: LibraryAdd }
{ title: 'Report', to: 'https://github.com/AdvancedAlgos/KeyVaultModule/issues/new', icon: LibraryAdd, externalLink: true }
]
}
+6 -7
View File
@@ -4,9 +4,6 @@ import { Link } from 'react-router-dom'
import jwtDecode from 'jwt-decode'
import withWidth from '@material-ui/core/withWidth'
// icons
import ExitIcon from '@material-ui/icons/ExitToApp'
// styles
import './styles.scss'
@@ -92,7 +89,12 @@ class Header extends Component {
<Link to={to} onClick={() => this.toggleMenuOpen(index, true)}> {title} </Link>
<ul className='subMenu'>
{
submenus.map(({ icon: Icon, to: subTo, title: subTitle }, subindex) => {
submenus.map(({ icon: Icon, to: subTo, title: subTitle, externalLink }, subindex) => {
if (externalLink) {
return (
<li key={subindex}><a href={subTo}> <Icon /> {subTitle} </a></li>
)
}
return (
<li key={subindex}><Link to={subTo} onClick={() => this.closeAll(index)}> <Icon /> {subTitle} </Link></li>
)
@@ -134,9 +136,6 @@ class Header extends Component {
<a href='#' onClick={() => auth.login()}> Login / Sign Up </a>
</li>
)}
<li className='primaryLink'>
<a href='https://www.advancedalgos.net'> <ExitIcon /> </a>
</li>
</ul>
</nav>
</div>