moduleUpsellHookWrapper.tsx 669 B

12345678910111213141516171819202122
  1. import HookOrDefault from 'sentry/components/hookOrDefault';
  2. import type {TitleableModuleNames} from 'sentry/views/insights/common/components/modulePageProviders';
  3. // TODO - remove, This is only necessary for domain views, where we don't want to show the full upsell page.
  4. export function ModuleBodyUpsellHook({
  5. moduleName,
  6. children,
  7. }: {
  8. children: React.ReactNode;
  9. moduleName: TitleableModuleNames;
  10. }) {
  11. return (
  12. <UpsellPageHook moduleName={moduleName} fullPage={false}>
  13. {children}
  14. </UpsellPageHook>
  15. );
  16. }
  17. const UpsellPageHook = HookOrDefault({
  18. hookName: 'component:insights-upsell-page',
  19. defaultComponent: ({children}) => children,
  20. });