groupEventHeader.tsx 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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} from 'sentry/types/event';
  6. import type {Group} from 'sentry/types/group';
  7. import type {Project} from 'sentry/types/project';
  8. import useOrganization from 'sentry/utils/useOrganization';
  9. import {GroupEventCarousel} from 'sentry/views/issueDetails/groupEventCarousel';
  10. import {TraceTimeLineOrRelatedIssue} from './traceTimelineOrRelatedIssue';
  11. type GroupEventHeaderProps = {
  12. event: Event;
  13. group: Group;
  14. project: Project;
  15. };
  16. function GroupEventHeader({event, group, project}: GroupEventHeaderProps) {
  17. const organization = useOrganization();
  18. return (
  19. <StyledDataSection>
  20. <GroupEventCarousel group={group} event={event} projectSlug={project.slug} />
  21. <TraceTimeLineOrRelatedIssue event={event} />
  22. <StyledGlobalAppStoreConnectUpdateAlert
  23. project={project}
  24. organization={organization}
  25. />
  26. </StyledDataSection>
  27. );
  28. }
  29. const StyledGlobalAppStoreConnectUpdateAlert = styled(GlobalAppStoreConnectUpdateAlert)`
  30. margin: ${space(0.5)} 0;
  31. `;
  32. const StyledDataSection = styled(DataSection)`
  33. padding: ${space(1)} ${space(2)} 0;
  34. @media (min-width: ${p => p.theme.breakpoints.medium}) {
  35. padding: ${space(1.5)} ${space(4)} 0;
  36. }
  37. `;
  38. export default GroupEventHeader;