issuesDataConsentBanner.tsx 486 B

123456789101112131415
  1. import {useContext} from 'react';
  2. import HookOrDefault from 'sentry/components/hookOrDefault';
  3. import {NewTabContext} from 'sentry/views/issueList/utils/newTabContext';
  4. const DataConsentBanner = HookOrDefault({
  5. hookName: 'component:data-consent-banner',
  6. defaultComponent: null,
  7. });
  8. export function IssuesDataConsentBanner({source}: {source: string}) {
  9. const {newViewActive} = useContext(NewTabContext);
  10. return newViewActive ? null : <DataConsentBanner source={source} />;
  11. }