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