1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-11-24 08:22:29 +02:00

Don't show share board action for single-user

This commit is contained in:
Chen-I Lim 2021-01-25 14:02:44 -08:00
parent df4fe5bc42
commit 2dd7848b9b

View File

@ -12,6 +12,7 @@ import ViewMenu from '../components/viewMenu'
import {Constants} from '../constants'
import {CsvExporter} from '../csvExporter'
import mutator from '../mutator'
import {UserContext} from '../user'
import {BoardTree} from '../viewModel/boardTree'
import Button from '../widgets/buttons/button'
import IconButton from '../widgets/buttons/iconButton'
@ -303,11 +304,15 @@ class ViewHeader extends React.Component<Props, State> {
name={intl.formatMessage({id: 'ViewHeader.export-board-archive', defaultMessage: 'Export board archive'})}
onClick={() => Archiver.exportBoardTree(boardTree)}
/> */}
<Menu.Text
id='shareBoard'
name={intl.formatMessage({id: 'ViewHeader.share-board', defaultMessage: 'Share board'})}
onClick={this.showShareDialog}
/>
<UserContext.Consumer>
{(user) => (user && user.id !== 'single-user' &&
<Menu.Text
id='shareBoard'
name={intl.formatMessage({id: 'ViewHeader.share-board', defaultMessage: 'Share board'})}
onClick={this.showShareDialog}
/>
)}
</UserContext.Consumer>
{/*