Fix LYS success page shown but Task not crossed off (#46663)

* Add useDispatch hook and ONBOARDING_STORE_NAME import in Congrats.tsx

* Add changelog
This commit is contained in:
Chi-Hsuan Huang 2024-04-18 10:29:07 +12:00 committed by GitHub
parent d2c4490c92
commit da5272497d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -14,6 +14,8 @@ import { closeSmall } from '@wordpress/icons';
import { CustomerFeedbackSimple } from '@woocommerce/customer-effort-score';
import { useCopyToClipboard } from '@wordpress/compose';
import { Button, TextareaControl, Icon, Dashicon } from '@wordpress/components';
import { useDispatch } from '@wordpress/data';
import { ONBOARDING_STORE_NAME } from '@woocommerce/data';
/**
* Internal dependencies
@ -64,6 +66,10 @@ export const Congrats = ( {
}
);
const { invalidateResolutionForStoreSelector } = useDispatch(
ONBOARDING_STORE_NAME
);
const sendData = () => {
const emojis = {
1: 'very_difficult',
@ -96,6 +102,7 @@ export const Congrats = ( {
recordEvent(
'launch_your_store_congrats_back_to_home_click'
);
invalidateResolutionForStoreSelector( 'getTaskLists' );
navigateTo( { url: '/' } );
} }
className="back-to-home-button"

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fix LYS success page shown but Task not crossed off