Move useCampaigns to shared hooks directory.

This commit is contained in:
Gan Eng Chin 2023-03-19 22:54:55 +08:00
parent c6a95ae9bf
commit 458c16bad9
No known key found for this signature in database
GPG Key ID: 94D5D972860ADB01
4 changed files with 4 additions and 7 deletions

View File

@ -3,3 +3,4 @@ export { useInstalledPlugins } from './useInstalledPlugins';
export { useRegisteredChannels } from './useRegisteredChannels';
export { useRecommendedChannels } from './useRecommendedChannels';
export { useCampaignTypes } from './useCampaignTypes';
export { useCampaigns } from './useCampaigns';

View File

@ -7,15 +7,11 @@ import userEvent from '@testing-library/user-event';
/**
* Internal dependencies
*/
import { useCampaigns } from './useCampaigns';
import { useCampaignTypes } from '~/marketing/hooks';
import { useCampaignTypes, useCampaigns } from '~/marketing/hooks';
import { Campaigns } from './Campaigns';
jest.mock( './useCampaigns', () => ( {
useCampaigns: jest.fn(),
} ) );
jest.mock( '~/marketing/hooks', () => ( {
useCampaigns: jest.fn(),
useCampaignTypes: jest.fn(),
} ) );

View File

@ -28,7 +28,7 @@ import {
CardHeaderTitle,
CreateNewCampaignModal,
} from '~/marketing/components';
import { useCampaigns } from './useCampaigns';
import { useCampaigns } from '~/marketing/hooks';
import './Campaigns.scss';
const tableCaption = __( 'Campaigns', 'woocommerce' );