This repository was archived by the owner on Jul 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed
homescreen/activity-panel
profile-wizard/steps/store-details Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 11/**
22 * External dependencies
33 */
4- import { useDispatch , useSelect } from '@wordpress/data' ;
4+ import { useSelect } from '@wordpress/data' ;
55import { Badge } from '@woocommerce/components' ;
66import {
77 Button ,
@@ -56,17 +56,10 @@ export const ActivityPanel = () => {
5656 } ;
5757 } ) ;
5858
59- const { invalidateResolutionForStoreSelector } = useDispatch (
60- ONBOARDING_STORE_NAME
61- ) ;
62-
6359 const panels = getAllPanels ( panelsData ) ;
6460
6561 useEffect ( ( ) => {
6662 if ( panelsData . isTaskListHidden !== undefined ) {
67- if ( ! panelsData . isTaskListHidden ) {
68- invalidateResolutionForStoreSelector ( 'getTaskLists' ) ;
69- }
7063 const visiblePanels = panels . reduce (
7164 ( acc , panel ) => {
7265 const panelId = snakeCase ( panel . id ) ;
Original file line number Diff line number Diff line change @@ -230,7 +230,13 @@ class StoreDetails extends Component {
230230 isStoreDetailsPopoverVisible,
231231 isSkipSetupPopoverVisible,
232232 } = this . state ;
233- const { skipProfiler, isLoading, isBusy, initialValues } = this . props ;
233+ const {
234+ skipProfiler,
235+ isLoading,
236+ isBusy,
237+ initialValues,
238+ invalidateResolutionForStoreSelector,
239+ } = this . props ;
234240
235241 /* eslint-disable @wordpress/i18n-no-collapsible-whitespace */
236242 const skipSetupText = __ (
@@ -390,6 +396,9 @@ class StoreDetails extends Component {
390396 isLink
391397 className = "woocommerce-profile-wizard__footer-link"
392398 onClick = { ( ) => {
399+ invalidateResolutionForStoreSelector (
400+ 'getTaskLists'
401+ ) ;
393402 this . setState ( {
394403 showUsageModal : true ,
395404 skipping : true ,
@@ -498,13 +507,17 @@ export default compose(
498507 } ) ,
499508 withDispatch ( ( dispatch ) => {
500509 const { createNotice } = dispatch ( 'core/notices' ) ;
501- const { updateProfileItems } = dispatch ( ONBOARDING_STORE_NAME ) ;
510+ const {
511+ invalidateResolutionForStoreSelector,
512+ updateProfileItems,
513+ } = dispatch ( ONBOARDING_STORE_NAME ) ;
502514 const { updateAndPersistSettingsForGroup } = dispatch (
503515 SETTINGS_STORE_NAME
504516 ) ;
505517
506518 return {
507519 createNotice,
520+ invalidateResolutionForStoreSelector,
508521 updateProfileItems,
509522 updateAndPersistSettingsForGroup,
510523 } ;
You can’t perform that action at this time.
0 commit comments