Fix build errors after merging from trunk.

This commit is contained in:
Gan Eng Chin 2023-03-22 18:35:06 +08:00
parent 186f1fb850
commit 59c94ce24a
No known key found for this signature in database
GPG Key ID: 94D5D972860ADB01
3 changed files with 9 additions and 7 deletions

View File

@ -11,7 +11,7 @@ import {
useCampaignTypes,
useRecommendedChannels,
useRegisteredChannels,
useInstalledPlugins,
useInstalledPluginsWithoutChannels,
} from '~/marketing/hooks';
import { CreateNewCampaignModal } from './CreateNewCampaignModal';
@ -29,7 +29,7 @@ jest.mock( '~/marketing/hooks', () => ( {
useCampaignTypes: jest.fn(),
useRecommendedChannels: jest.fn(),
useRegisteredChannels: jest.fn(),
useInstalledPlugins: jest.fn(),
useInstalledPluginsWithoutChannels: jest.fn(),
} ) );
const google = {
@ -83,7 +83,7 @@ describe( 'CreateNewCampaignModal component', () => {
( useRegisteredChannels as jest.Mock ).mockReturnValue( {
refetch: jest.fn(),
} );
( useInstalledPlugins as jest.Mock ).mockReturnValue( {
( useInstalledPluginsWithoutChannels as jest.Mock ).mockReturnValue( {
loadInstalledPluginsAfterActivation: jest.fn(),
} );
} );

View File

@ -21,7 +21,7 @@ import {
useRecommendedChannels,
useCampaignTypes,
useRegisteredChannels,
useInstalledPlugins,
useInstalledPluginsWithoutChannels,
} from '~/marketing/hooks';
import { SmartPluginCardBody } from '~/marketing/components';
import './CreateNewCampaignModal.scss';
@ -44,7 +44,8 @@ export const CreateNewCampaignModal = ( props: CreateCampaignModalProps ) => {
useCampaignTypes();
const { refetch: refetchRegisteredChannels } = useRegisteredChannels();
const { data: recommendedChannels } = useRecommendedChannels();
const { loadInstalledPluginsAfterActivation } = useInstalledPlugins();
const { loadInstalledPluginsAfterActivation } =
useInstalledPluginsWithoutChannels();
const onInstalledAndActivated = ( pluginSlug: string ) => {
refetchCampaignTypes();

View File

@ -16,7 +16,7 @@ import {
useRegisteredChannels,
useRecommendedChannels,
useCampaignTypes,
useInstalledPlugins,
useInstalledPluginsWithoutChannels,
} from '~/marketing/hooks';
import { getAdminSetting } from '~/utils/admin-settings';
import { IntroductionBanner } from './IntroductionBanner';
@ -46,7 +46,8 @@ export const MarketingOverviewMultichannel: React.FC = () => {
} = useRegisteredChannels();
const { loading: loadingRecommended, data: dataRecommended } =
useRecommendedChannels();
const { loadInstalledPluginsAfterActivation } = useInstalledPlugins();
const { loadInstalledPluginsAfterActivation } =
useInstalledPluginsWithoutChannels();
const { currentUserCan } = useUser();
const channelsRef = useRef< ChannelsRef >( null );