IntegrationOverviewTabWrapper.tsx22 lines · main
1/**
2 * [Joshen] This is just to dynamically render either the V1 or V2 Overview tab based
3 * on the marketplace feature flag
4 */
5
6import { PropsWithChildren } from 'react'
7
8import { IntegrationOverviewTab, IntegrationOverviewTabProps } from './IntegrationOverviewTab'
9import { IntegrationOverviewTabV2 } from './IntegrationOverviewTabV2'
10import { useIsMarketplaceEnabled } from '@/components/interfaces/App/FeaturePreview/FeaturePreviewContext'
11
12export const IntegrationOverviewTabWrapper = (
13 props: PropsWithChildren<IntegrationOverviewTabProps>
14) => {
15 const isMarketplaceEnabled = useIsMarketplaceEnabled()
16
17 if (isMarketplaceEnabled) {
18 return <IntegrationOverviewTabV2>{props.children}</IntegrationOverviewTabV2>
19 } else {
20 return <IntegrationOverviewTab {...props} />
21 }
22}