IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
862B

  1. import { h, Component } from 'preact';
  2. import WBNavbar from 'wb-navbar';
  3. import WBInlineSearch from 'wb-inline-search';
  4. class WBNavbarCommon extends Component {
  5. render({ app, items, activeItem }) {
  6. return (
  7. <WBNavbar
  8. items={ [
  9. { 'name': 'Home', 'id': 'home' },
  10. { 'name': 'All Projects', 'id': 'all-projects' },
  11. { 'name': 'All Users', 'id': 'all-users' },
  12. { 'name': 'Current User', 'dropdown': [ { 'id': 'sign-out', 'name': 'Sign Out' } ]}
  13. ].concat(items) }
  14. rhs={ (
  15. <WBInlineSearch />
  16. ) }
  17. titleUrl = { '/browse/' + app.state.currentUser.uuid }
  18. getItemUrl={ item => app.navbarItemUrl(item) }
  19. activeItem={ activeItem } />
  20. );
  21. }
  22. }
  23. WBNavbarCommon.defaultProps = {
  24. 'items': []
  25. };
  26. export default WBNavbarCommon;