From e950417542514b85325338552d8023c5756862fe Mon Sep 17 00:00:00 2001 From: Gan Eng Chin Date: Sat, 24 Dec 2022 00:48:03 +0800 Subject: [PATCH] Move useRegisteredChannels and useRecommendedChannels into shared hooks directory. --- plugins/woocommerce-admin/client/marketing/hooks/index.ts | 2 ++ .../Channels => hooks}/useRecommendedChannels.ts | 0 .../Channels => hooks}/useRegisteredChannels.ts | 0 .../marketing/overview-multichannel/Channels/Channels.tsx | 6 ++++-- 4 files changed, 6 insertions(+), 2 deletions(-) rename plugins/woocommerce-admin/client/marketing/{overview-multichannel/Channels => hooks}/useRecommendedChannels.ts (100%) rename plugins/woocommerce-admin/client/marketing/{overview-multichannel/Channels => hooks}/useRegisteredChannels.ts (100%) diff --git a/plugins/woocommerce-admin/client/marketing/hooks/index.ts b/plugins/woocommerce-admin/client/marketing/hooks/index.ts index a504ae73f17..0a80d7f7f22 100644 --- a/plugins/woocommerce-admin/client/marketing/hooks/index.ts +++ b/plugins/woocommerce-admin/client/marketing/hooks/index.ts @@ -1 +1,3 @@ export { useInstalledPlugins } from './useInstalledPlugins'; +export { useRegisteredChannels } from './useRegisteredChannels'; +export { useRecommendedChannels } from './useRecommendedChannels'; diff --git a/plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/useRecommendedChannels.ts b/plugins/woocommerce-admin/client/marketing/hooks/useRecommendedChannels.ts similarity index 100% rename from plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/useRecommendedChannels.ts rename to plugins/woocommerce-admin/client/marketing/hooks/useRecommendedChannels.ts diff --git a/plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/useRegisteredChannels.ts b/plugins/woocommerce-admin/client/marketing/hooks/useRegisteredChannels.ts similarity index 100% rename from plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/useRegisteredChannels.ts rename to plugins/woocommerce-admin/client/marketing/hooks/useRegisteredChannels.ts diff --git a/plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/Channels.tsx b/plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/Channels.tsx index c485bef0bce..32b5d3a2879 100644 --- a/plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/Channels.tsx +++ b/plugins/woocommerce-admin/client/marketing/overview-multichannel/Channels/Channels.tsx @@ -13,8 +13,10 @@ import { CardHeaderDescription, CenteredSpinner, } from '~/marketing/components'; -import { useRegisteredChannels } from './useRegisteredChannels'; -import { useRecommendedChannels } from './useRecommendedChannels'; +import { + useRegisteredChannels, + useRecommendedChannels, +} from '~/marketing/hooks'; import { InstalledChannelCardBody } from './InstalledChannelCardBody'; import { RecommendedChannels } from './RecommendedChannels'; import { RecommendedChannelsList } from './RecommendedChannelsList';