import React, { Component, Fragment } from 'react'; import PropTypes from 'prop-types'; import { gettext, invitationLink } from '../../utils/constants'; import Account from '../../components/common/account'; const propTypes = { currentTab: PropTypes.string, toggleAddOrgUser: PropTypes.func, toggleAddOrgAdmin: PropTypes.func, toggleInviteUserDialog: PropTypes.func, toggleAddDepartDialog: PropTypes.func, toggleAddMemberDialog: PropTypes.func, toggleAddRepoDialog: PropTypes.func, }; class MainPanelTopbar extends Component { render() { const topBtn = 'btn btn-secondary operation-item'; const groupID = this.props.groupID; return (
{this.props.currentTab === 'users' && {invitationLink && } } {this.props.currentTab === 'admins' && } {this.props.currentTab === 'departmentadmin' && {!groupID && } {groupID && } {groupID && } {groupID && } }
); } } MainPanelTopbar.propTypes = propTypes; export default MainPanelTopbar;