[Accessibility] Fix typo in noticeDismissed ref (#48706)

* Fix "Dimissed" typo

* Add changelog file

---------

Co-authored-by: Daniel W. Robert <danielwrobert@users.noreply.github.com>
This commit is contained in:
Gabriel Manussakis 2024-08-23 17:07:16 -03:00 committed by GitHub
parent 50e7a85821
commit 4298e572c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: tweak
Fix typo in noticeDismissed ref

View File

@ -34,7 +34,7 @@ export function Edit( {
attributes,
context: { isInSelectedTab },
}: ProductEditorBlockEditProps< VariationOptionsBlockAttributes > ) {
const noticeDimissed = useRef( false );
const noticeDismissed = useRef( false );
const { invalidateResolution } = useDispatch(
EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME
);
@ -107,7 +107,7 @@ export function Edit( {
*/
if (
totalCountWithoutPrice > 0 &&
! noticeDimissed.current &&
! noticeDismissed.current &&
productStatus !== 'publish' &&
// New status.
newData?.status === 'publish'
@ -198,7 +198,7 @@ export function Edit( {
ref={ variationTableRef as React.Ref< HTMLDivElement > }
noticeText={ noticeText }
onNoticeDismiss={ () => {
noticeDimissed.current = true;
noticeDismissed.current = true;
updateUserPreferences( {
variable_items_without_price_notice_dismissed: {
...( itemsWithoutPriceNoticeDismissed || {} ),