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

View File

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

View File

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