Ensure we are watching to the correct store so updates get propagated

MAILPOET-6432
This commit is contained in:
Oluwaseun Olorunsola
2025-02-06 15:27:58 +01:00
committed by Rostislav Wolný
parent 5190ac1ff2
commit 5470b079a1

View File

@ -3,6 +3,7 @@
*/
import { useCallback } from '@wordpress/element';
import { useSelect, subscribe } from '@wordpress/data';
import { store as coreDataStore } from '@wordpress/core-data';
import { applyFilters } from '@wordpress/hooks';
/**
@ -72,7 +73,7 @@ export const useContentValidation = (): ContentValidationData => {
return;
}
validateContent();
}, emailEditorStore );
}, coreDataStore );
return {
isInvalid: hasValidationNotice(),