Move useCampaigns to shared hooks directory.
This commit is contained in:
parent
c6a95ae9bf
commit
458c16bad9
|
@ -3,3 +3,4 @@ export { useInstalledPlugins } from './useInstalledPlugins';
|
||||||
export { useRegisteredChannels } from './useRegisteredChannels';
|
export { useRegisteredChannels } from './useRegisteredChannels';
|
||||||
export { useRecommendedChannels } from './useRecommendedChannels';
|
export { useRecommendedChannels } from './useRecommendedChannels';
|
||||||
export { useCampaignTypes } from './useCampaignTypes';
|
export { useCampaignTypes } from './useCampaignTypes';
|
||||||
|
export { useCampaigns } from './useCampaigns';
|
||||||
|
|
|
@ -7,15 +7,11 @@ import userEvent from '@testing-library/user-event';
|
||||||
/**
|
/**
|
||||||
* Internal dependencies
|
* Internal dependencies
|
||||||
*/
|
*/
|
||||||
import { useCampaigns } from './useCampaigns';
|
import { useCampaignTypes, useCampaigns } from '~/marketing/hooks';
|
||||||
import { useCampaignTypes } from '~/marketing/hooks';
|
|
||||||
import { Campaigns } from './Campaigns';
|
import { Campaigns } from './Campaigns';
|
||||||
|
|
||||||
jest.mock( './useCampaigns', () => ( {
|
|
||||||
useCampaigns: jest.fn(),
|
|
||||||
} ) );
|
|
||||||
|
|
||||||
jest.mock( '~/marketing/hooks', () => ( {
|
jest.mock( '~/marketing/hooks', () => ( {
|
||||||
|
useCampaigns: jest.fn(),
|
||||||
useCampaignTypes: jest.fn(),
|
useCampaignTypes: jest.fn(),
|
||||||
} ) );
|
} ) );
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ import {
|
||||||
CardHeaderTitle,
|
CardHeaderTitle,
|
||||||
CreateNewCampaignModal,
|
CreateNewCampaignModal,
|
||||||
} from '~/marketing/components';
|
} from '~/marketing/components';
|
||||||
import { useCampaigns } from './useCampaigns';
|
import { useCampaigns } from '~/marketing/hooks';
|
||||||
import './Campaigns.scss';
|
import './Campaigns.scss';
|
||||||
|
|
||||||
const tableCaption = __( 'Campaigns', 'woocommerce' );
|
const tableCaption = __( 'Campaigns', 'woocommerce' );
|
||||||
|
|
Loading…
Reference in New Issue