groupEventHeader.tsx 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 {Group, Project} from 'sentry/types';
  6. import {Event} from 'sentry/types/event';
  7. import useOrganization from 'sentry/utils/useOrganization';
  8. import {GroupEventCarousel} from 'sentry/views/issueDetails/groupEventCarousel';
  9. import {OpenAIFixSuggestionPanel} from 'sentry/views/issueDetails/openAIFixSuggestion/openAIFixSuggestionPanel';
  10. type GroupEventHeaderProps = {
  11. event: Event;
  12. group: Group;
  13. project: Project;
  14. hasReplay?: boolean;
  15. };
  16. const GroupEventHeader = ({event, group, project}: GroupEventHeaderProps) => {
  17. const organization = useOrganization();
  18. return (
  19. <DataSection>
  20. <GroupEventCarousel group={group} event={event} projectSlug={project.slug} />
  21. <OpenAIFixSuggestionPanel projectSlug={project.slug} eventID={event.eventID} />
  22. <StyledGlobalAppStoreConnectUpdateAlert
  23. project={project}
  24. organization={organization}
  25. />
  26. </DataSection>
  27. );
  28. };
  29. const StyledGlobalAppStoreConnectUpdateAlert = styled(GlobalAppStoreConnectUpdateAlert)`
  30. margin: ${space(0.5)} 0;
  31. `;
  32. export default GroupEventHeader;