ProjectIntegrationsLayoutDispatch.tsx 629 B

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