Fixing create-board from board selector in desktop app (#3657)

This commit is contained in:
Jesús Espino 2022-08-11 21:24:33 +02:00 committed by GitHub
parent 16ca853cc0
commit d029a390fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,6 +85,28 @@ function CenterContent(props: Props) {
}
}, [cardLimitTimestamp, match.params.boardId, templates])
const templateSelector = (
<BoardTemplateSelector
title={
<FormattedMessage
id='BoardTemplateSelector.plugin.no-content-title'
defaultMessage='Create a board'
/>
}
description={
<FormattedMessage
id='BoardTemplateSelector.plugin.no-content-description'
defaultMessage='Add a board to the sidebar using any of the templates defined below or start from scratch.'
/>
}
channelId={match.params.channelId}
/>
)
if (match.params.channelId) {
return templateSelector
}
if (board && !isBoardHidden() && activeView) {
let property = groupByProperty
if ((!property || property.type !== 'select') && activeView.fields.viewType === 'board') {
@ -117,23 +139,7 @@ function CenterContent(props: Props) {
return null
}
return (
<BoardTemplateSelector
title={
<FormattedMessage
id='BoardTemplateSelector.plugin.no-content-title'
defaultMessage='Create a board'
/>
}
description={
<FormattedMessage
id='BoardTemplateSelector.plugin.no-content-description'
defaultMessage='Add a board to the sidebar using any of the templates defined below or start from scratch.'
/>
}
channelId={match.params.channelId}
/>
)
return templateSelector
}
const Workspace = (props: Props) => {