groupEventHeader.tsx 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import styled from '@emotion/styled';
  2. import {DataSection} from 'sentry/components/events/styles';
  3. import GlobalAppStoreConnectUpdateAlert from 'sentry/components/globalAppStoreConnectUpdateAlert';
  4. import {space} from 'sentry/styles/space';
  5. import type {Event, Group, Project} from 'sentry/types';
  6. import useOrganization from 'sentry/utils/useOrganization';
  7. import {GroupEventCarousel} from 'sentry/views/issueDetails/groupEventCarousel';
  8. import {TraceTimeline} from 'sentry/views/issueDetails/traceTimeline/traceTimeline';
  9. type GroupEventHeaderProps = {
  10. event: Event;
  11. group: Group;
  12. project: Project;
  13. };
  14. function GroupEventHeader({event, group, project}: GroupEventHeaderProps) {
  15. const organization = useOrganization();
  16. return (
  17. <DataSection>
  18. <GroupEventCarousel group={group} event={event} projectSlug={project.slug} />
  19. <StyledGlobalAppStoreConnectUpdateAlert
  20. project={project}
  21. organization={organization}
  22. />
  23. <TraceTimeline event={event} />
  24. </DataSection>
  25. );
  26. }
  27. const StyledGlobalAppStoreConnectUpdateAlert = styled(GlobalAppStoreConnectUpdateAlert)`
  28. margin: ${space(0.5)} 0;
  29. `;
  30. export default GroupEventHeader;