From 2334c2721a25199b31d0349f3382d5b728b27766 Mon Sep 17 00:00:00 2001 From: Ari Stathopoulos Date: Mon, 24 May 2021 13:19:26 +0300 Subject: [PATCH] fix: no-string-literals in the nux package --- packages/nux/src/components/dot-tip/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/nux/src/components/dot-tip/index.js b/packages/nux/src/components/dot-tip/index.js index fa24375c3ccd0..308e07a0b689c 100644 --- a/packages/nux/src/components/dot-tip/index.js +++ b/packages/nux/src/components/dot-tip/index.js @@ -8,6 +8,11 @@ import { withSelect, withDispatch } from '@wordpress/data'; import { useCallback, useRef } from '@wordpress/element'; import { close } from '@wordpress/icons'; +/** + * Internal dependencies + */ +import { store as nuxStore } from '../../store'; + function onClick( event ) { // Tips are often nested within buttons. We stop propagation so that clicking // on a tip doesn't result in the button being clicked. @@ -69,7 +74,7 @@ export function DotTip( { export default compose( withSelect( ( select, { tipId } ) => { - const { isTipVisible, getAssociatedGuide } = select( 'core/nux' ); + const { isTipVisible, getAssociatedGuide } = select( nuxStore ); const associatedGuide = getAssociatedGuide( tipId ); return { isVisible: isTipVisible( tipId ), @@ -77,7 +82,7 @@ export default compose( }; } ), withDispatch( ( dispatch, { tipId } ) => { - const { dismissTip, disableTips } = dispatch( 'core/nux' ); + const { dismissTip, disableTips } = dispatch( nuxStore ); return { onDismiss() { dismissTip( tipId );