ProjectIntegrationsLayoutDispatch.tsx13 lines · main
1import type { PropsWithChildren } from 'react'
2
3import { ProjectIntegrationsLayout } from './ProjectIntegrationsLayout'
4import { ProjectMarketplaceLayout } from './ProjectMarketplaceLayout'
5import { useIsMarketplaceEnabled } from '@/components/interfaces/App/FeaturePreview/FeaturePreviewContext'
6
7export const ProjectIntegrationsLayoutDispatch = ({ children }: PropsWithChildren) => {
8 const isMarketplaceEnabled = useIsMarketplaceEnabled()
9 if (isMarketplaceEnabled) {
10 return <ProjectMarketplaceLayout>{children}</ProjectMarketplaceLayout>
11 }
12 return <ProjectIntegrationsLayout>{children}</ProjectIntegrationsLayout>
13}