[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:
parent
50e7a85821
commit
4298e572c4
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: tweak
|
||||
|
||||
Fix typo in noticeDismissed ref
|
|
@ -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 || {} ),
|
||||
|
|
Loading…
Reference in New Issue