Display the task components regardless of woocommerce_task_list_hidden value (https://github.com/woocommerce/woocommerce-admin/pull/6026)

This commit is contained in:
Moon 2021-01-07 19:24:23 -08:00 committed by GitHub
parent 3338c273c2
commit aa602e66cf
2 changed files with 3 additions and 6 deletions

View File

@ -60,7 +60,7 @@ export const Layout = ( {
const [ showInbox, setShowInbox ] = useState( true ); const [ showInbox, setShowInbox ] = useState( true );
const isTaskListEnabled = taskListHidden === false; const isTaskListEnabled = taskListHidden === false;
const isDashboardShown = ! isTaskListEnabled || ! query.task; const isDashboardShown = ! query.task;
if ( isBatchUpdating && ! showInbox ) { if ( isBatchUpdating && ! showInbox ) {
setShowInbox( true ); setShowInbox( true );
@ -129,9 +129,7 @@ export const Layout = ( {
'two-columns': twoColumns, 'two-columns': twoColumns,
} ) } } ) }
> >
{ isDashboardShown { isDashboardShown ? renderColumns() : renderTaskList() }
? renderColumns()
: isTaskListEnabled && renderTaskList() }
{ shouldShowWelcomeModal && ( { shouldShowWelcomeModal && (
<WelcomeModal <WelcomeModal
onClose={ () => { onClose={ () => {

View File

@ -116,7 +116,6 @@ export class TaskDashboard extends Component {
dismissedTasks, dismissedTasks,
isExtendedTaskListComplete, isExtendedTaskListComplete,
isExtendedTaskListHidden, isExtendedTaskListHidden,
isSetupTaskListHidden,
isTaskListComplete, isTaskListComplete,
query, query,
trackedCompletedTasks, trackedCompletedTasks,
@ -127,7 +126,7 @@ export class TaskDashboard extends Component {
return ( return (
<> <>
{ setupTasks && ! isSetupTaskListHidden && ( { setupTasks && (
<TaskList <TaskList
dismissedTasks={ dismissedTasks || [] } dismissedTasks={ dismissedTasks || [] }
isTaskListComplete={ isTaskListComplete } isTaskListComplete={ isTaskListComplete }