Simplifying a bit the view header
This commit is contained in:
parent
933ccce948
commit
0890698280
2 changed files with 4 additions and 3 deletions
|
@ -135,7 +135,6 @@ class CenterPanel extends React.Component<Props, State> {
|
|||
addCardFromTemplate={this.addCardFromTemplate}
|
||||
addCardTemplate={this.addCardTemplate}
|
||||
editCardTemplate={this.editCardTemplate}
|
||||
withGroupBy={activeView.viewType === 'board'}
|
||||
readonly={this.props.readonly}
|
||||
/>
|
||||
{activeView.viewType === 'board' &&
|
||||
|
|
|
@ -6,6 +6,7 @@ import {FormattedMessage} from 'react-intl'
|
|||
import ViewMenu from '../../components/viewMenu'
|
||||
import mutator from '../../mutator'
|
||||
import {BoardTree} from '../../viewModel/boardTree'
|
||||
import {IViewType} from '../../blocks/boardView'
|
||||
import Button from '../../widgets/buttons/button'
|
||||
import IconButton from '../../widgets/buttons/iconButton'
|
||||
import DropdownIcon from '../../widgets/icons/dropdown'
|
||||
|
@ -32,16 +33,17 @@ type Props = {
|
|||
addCardFromTemplate: (cardTemplateId: string) => void
|
||||
addCardTemplate: () => void
|
||||
editCardTemplate: (cardTemplateId: string) => void
|
||||
withGroupBy?: boolean
|
||||
readonly: boolean
|
||||
}
|
||||
|
||||
const ViewHeader = React.memo((props: Props) => {
|
||||
const [showFilter, setShowFilter] = useState(false)
|
||||
|
||||
const {boardTree, showView, withGroupBy} = props
|
||||
const {boardTree, showView} = props
|
||||
const {board, activeView} = boardTree
|
||||
|
||||
const withGroupBy = activeView.type === 'board'
|
||||
|
||||
const [viewTitle, setViewTitle] = useState(activeView.title)
|
||||
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Reference in a new issue