mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 14:57:26 +08:00
Pass modal and highlight to item
This commit is contained in:
parent
36bf0d9e7f
commit
c32127fe40
1 changed files with 6 additions and 4 deletions
|
@ -26,10 +26,6 @@ import {
|
||||||
import SpinnerOverlay from '../../../ReusableComponents/SpinnerOverlay';
|
import SpinnerOverlay from '../../../ReusableComponents/SpinnerOverlay';
|
||||||
import { useFeatures } from '../../../../data/features/hooks';
|
import { useFeatures } from '../../../../data/features/hooks';
|
||||||
import { selectTab, TAB_IDS } from '../../../../utils/tabSelector';
|
import { selectTab, TAB_IDS } from '../../../../utils/tabSelector';
|
||||||
import {
|
|
||||||
setActiveHighlight,
|
|
||||||
setActiveModal,
|
|
||||||
} from '../../../../data/common/actions';
|
|
||||||
|
|
||||||
const TabOverview = () => {
|
const TabOverview = () => {
|
||||||
const { isReady: areTodosReady } = TodosHooks.useStore();
|
const { isReady: areTodosReady } = TodosHooks.useStore();
|
||||||
|
@ -126,6 +122,8 @@ const OverviewFeatures = () => {
|
||||||
const [ isRefreshing, setIsRefreshing ] = useState( false );
|
const [ isRefreshing, setIsRefreshing ] = useState( false );
|
||||||
const { merchant } = CommonHooks.useMerchantInfo();
|
const { merchant } = CommonHooks.useMerchantInfo();
|
||||||
const { refreshFeatureStatuses } = useDispatch( CommonStoreName );
|
const { refreshFeatureStatuses } = useDispatch( CommonStoreName );
|
||||||
|
const { setActiveModal, setActiveHighlight } =
|
||||||
|
useDispatch( CommonStoreName );
|
||||||
const { createSuccessNotice, createErrorNotice } =
|
const { createSuccessNotice, createErrorNotice } =
|
||||||
useDispatch( noticesStore );
|
useDispatch( noticesStore );
|
||||||
const { features, fetchFeatures } = useFeatures();
|
const { features, fetchFeatures } = useFeatures();
|
||||||
|
@ -196,6 +194,8 @@ const OverviewFeatures = () => {
|
||||||
buttons={ feature.buttons }
|
buttons={ feature.buttons }
|
||||||
enabled={ feature.isEligible }
|
enabled={ feature.isEligible }
|
||||||
notes={ feature.notes }
|
notes={ feature.notes }
|
||||||
|
setActiveModal={ setActiveModal }
|
||||||
|
setActiveHighlight={ setActiveHighlight }
|
||||||
/>
|
/>
|
||||||
) ) }
|
) ) }
|
||||||
</ContentWrapper>
|
</ContentWrapper>
|
||||||
|
@ -211,6 +211,8 @@ const OverviewFeatureItem = ( {
|
||||||
buttons,
|
buttons,
|
||||||
enabled,
|
enabled,
|
||||||
notes,
|
notes,
|
||||||
|
setActiveModal,
|
||||||
|
setActiveHighlight,
|
||||||
} ) => {
|
} ) => {
|
||||||
const getButtonUrl = ( button ) => {
|
const getButtonUrl = ( button ) => {
|
||||||
if ( button.urls ) {
|
if ( button.urls ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue