Remove unnecessary APIs calls when the setup tasklist is shown (#40291)

* Consider setup task hidden when activeSetupList is null

* Render ActivityPanel when the setup tasklist is hidden only

* Add changefile(s) from automation for the following project(s): woocommerce

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Moon 2023-09-21 15:35:45 -07:00 committed by GitHub
parent fb557cf21f
commit ce7038d814
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -164,9 +164,9 @@ export const ActivityPanel = ( { isEmbedded, query } ) => {
ONBOARDING_STORE_NAME
);
const setupList = getTaskList( activeSetupList );
const setupList = activeSetupList && getTaskList( activeSetupList );
const isSetupTaskListHidden = setupList?.isHidden ?? true;
const isSetupTaskListHidden = setupList?.isHidden ?? false;
const setupVisibleTasks = getVisibleTasks( setupList?.tasks || [] );
const extendedTaskList = getTaskList( 'extended' );

View File

@ -112,7 +112,7 @@ export const Layout = ( {
/>
) }
{ shouldShowWCPayFeature && <WooHomescreenWCPayFeature /> }
{ <ActivityPanel /> }
{ isTaskListHidden && <ActivityPanel /> }
{ hasTaskList && renderTaskList() }
<InboxPanel />
</Column>

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Remove unnecessary APIs calls when the setup tasklist is shown