groupDetails.tsx 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. import {cloneElement, Component, Fragment, isValidElement} from 'react';
  2. import {browserHistory, RouteComponentProps} from 'react-router';
  3. import styled from '@emotion/styled';
  4. import * as Sentry from '@sentry/react';
  5. import * as PropTypes from 'prop-types';
  6. import {fetchOrganizationEnvironments} from 'sentry/actionCreators/environments';
  7. import {Client} from 'sentry/api';
  8. import {shouldDisplaySetupSourceMapsAlert} from 'sentry/components/events/interfaces/crashContent/exception/setupSourceMapsAlert';
  9. import LoadingError from 'sentry/components/loadingError';
  10. import LoadingIndicator from 'sentry/components/loadingIndicator';
  11. import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
  12. import MissingProjectMembership from 'sentry/components/projects/missingProjectMembership';
  13. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  14. import {TabPanels, Tabs} from 'sentry/components/tabs';
  15. import {t} from 'sentry/locale';
  16. import SentryTypes from 'sentry/sentryTypes';
  17. import GroupStore from 'sentry/stores/groupStore';
  18. import {space} from 'sentry/styles/space';
  19. import {AvatarProject, Group, IssueCategory, Organization, Project} from 'sentry/types';
  20. import {Event} from 'sentry/types/event';
  21. import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAnalyticsEvent';
  22. import {getUtcDateString} from 'sentry/utils/dates';
  23. import {
  24. getAnalyticsDataForEvent,
  25. getAnalyticsDataForGroup,
  26. getMessage,
  27. getTitle,
  28. } from 'sentry/utils/events';
  29. import Projects, {getAnalyicsDataForProject} from 'sentry/utils/projects';
  30. import recreateRoute from 'sentry/utils/recreateRoute';
  31. import withRouteAnalytics, {
  32. WithRouteAnalyticsProps,
  33. } from 'sentry/utils/routeAnalytics/withRouteAnalytics';
  34. import withApi from 'sentry/utils/withApi';
  35. import {normalizeUrl} from 'sentry/utils/withDomainRequired';
  36. import {ERROR_TYPES} from './constants';
  37. import GroupHeader from './header';
  38. import SampleEventAlert from './sampleEventAlert';
  39. import {Tab, TabPaths} from './types';
  40. import {
  41. fetchGroupEvent,
  42. getGroupReprocessingStatus,
  43. markEventSeen,
  44. ReprocessingStatus,
  45. } from './utils';
  46. type Error = (typeof ERROR_TYPES)[keyof typeof ERROR_TYPES] | null;
  47. type Props = {
  48. api: Client;
  49. children: React.ReactNode;
  50. environments: string[];
  51. isGlobalSelectionReady: boolean;
  52. organization: Organization;
  53. projects: Project[];
  54. } & WithRouteAnalyticsProps &
  55. RouteComponentProps<{groupId: string; eventId?: string}, {}>;
  56. type State = {
  57. error: boolean;
  58. errorType: Error;
  59. eventError: boolean;
  60. group: Group | null;
  61. loading: boolean;
  62. loadingEvent: boolean;
  63. loadingGroup: boolean;
  64. project: null | (Pick<Project, 'id' | 'slug'> & Partial<Pick<Project, 'platform'>>);
  65. event?: Event;
  66. };
  67. class GroupDetails extends Component<Props, State> {
  68. static childContextTypes = {
  69. group: SentryTypes.Group,
  70. location: PropTypes.object,
  71. };
  72. state = this.initialState;
  73. getChildContext() {
  74. return {
  75. group: this.state.group,
  76. location: this.props.location,
  77. };
  78. }
  79. componentDidMount() {
  80. // only track the view if we are loading the event early
  81. this.fetchData(this.canLoadEventEarly(this.props));
  82. this.updateReprocessingProgress();
  83. // Fetch environments early - used in GroupEventDetailsContainer
  84. fetchOrganizationEnvironments(this.props.api, this.props.organization.slug);
  85. }
  86. componentDidUpdate(prevProps: Props, prevState: State) {
  87. const globalSelectionReadyChanged =
  88. prevProps.isGlobalSelectionReady !== this.props.isGlobalSelectionReady;
  89. if (
  90. globalSelectionReadyChanged ||
  91. prevProps.location.pathname !== this.props.location.pathname
  92. ) {
  93. // Skip tracking for other navigation events like switching events
  94. this.fetchData(globalSelectionReadyChanged && this.canLoadEventEarly(this.props));
  95. }
  96. if (
  97. (!this.canLoadEventEarly(prevProps) && !prevState?.group && this.state.group) ||
  98. (prevProps.params?.eventId !== this.props.params?.eventId && this.state.group)
  99. ) {
  100. // if we are loading events we should record analytics after it's loaded
  101. this.getEvent(this.state.group).then(() => {
  102. if (!this.state.group?.project) {
  103. return;
  104. }
  105. const project = this.props.projects.find(
  106. p => p.id === this.state.group?.project.id
  107. );
  108. project && this.trackView(project);
  109. });
  110. }
  111. }
  112. componentWillUnmount() {
  113. GroupStore.reset();
  114. this.listener?.();
  115. if (this.refetchInterval) {
  116. window.clearInterval(this.refetchInterval);
  117. }
  118. }
  119. refetchInterval: number | null = null;
  120. get initialState(): State {
  121. return {
  122. group: null,
  123. loading: true,
  124. loadingEvent: true,
  125. loadingGroup: true,
  126. error: false,
  127. eventError: false,
  128. errorType: null,
  129. project: null,
  130. };
  131. }
  132. trackView(project: Project) {
  133. const {group, event} = this.state;
  134. const {location, organization, router} = this.props;
  135. const {alert_date, alert_rule_id, alert_type, ref_fallback, stream_index, query} =
  136. location.query;
  137. this.props.setEventNames('issue_details.viewed', 'Issue Details: Viewed');
  138. this.props.setRouteAnalyticsParams({
  139. ...getAnalyticsDataForGroup(group),
  140. ...getAnalyticsDataForEvent(event),
  141. ...getAnalyicsDataForProject(project),
  142. stream_index: typeof stream_index === 'string' ? Number(stream_index) : undefined,
  143. query: typeof query === 'string' ? query : undefined,
  144. // Alert properties track if the user came from email/slack alerts
  145. alert_date:
  146. typeof alert_date === 'string' ? getUtcDateString(Number(alert_date)) : undefined,
  147. alert_rule_id: typeof alert_rule_id === 'string' ? alert_rule_id : undefined,
  148. alert_type: typeof alert_type === 'string' ? alert_type : undefined,
  149. has_setup_source_maps_alert: shouldDisplaySetupSourceMapsAlert(
  150. organization,
  151. router.location.query.project,
  152. event
  153. ),
  154. ref_fallback,
  155. // Will be updated by StacktraceLink if there is a stacktrace link
  156. stacktrace_link_viewed: false,
  157. // Will be updated by IssueQuickTrace if there is a trace
  158. trace_status: 'none',
  159. });
  160. }
  161. remountComponent = () => {
  162. this.setState(this.initialState);
  163. this.fetchData();
  164. };
  165. canLoadEventEarly(props: Props) {
  166. return !props.params.eventId || ['oldest', 'latest'].includes(props.params.eventId);
  167. }
  168. get groupDetailsEndpoint() {
  169. return `/issues/${this.props.params.groupId}/`;
  170. }
  171. get groupReleaseEndpoint() {
  172. return `/issues/${this.props.params.groupId}/first-last-release/`;
  173. }
  174. async getEvent(group?: Group) {
  175. if (group) {
  176. this.setState({loadingEvent: true, eventError: false});
  177. }
  178. const {params, environments, api, organization} = this.props;
  179. const orgSlug = organization.slug;
  180. const groupId = params.groupId;
  181. const eventId = params.eventId ?? 'latest';
  182. const projectId = group?.project?.slug;
  183. try {
  184. const event = await fetchGroupEvent(
  185. api,
  186. orgSlug,
  187. groupId,
  188. eventId,
  189. environments,
  190. projectId
  191. );
  192. this.setState({event, loading: false, eventError: false, loadingEvent: false});
  193. } catch (err) {
  194. // This is an expected error, capture to Sentry so that it is not considered as an unhandled error
  195. Sentry.captureException(err);
  196. this.setState({eventError: true, loading: false, loadingEvent: false});
  197. }
  198. }
  199. getCurrentTab() {
  200. const {router, routes} = this.props;
  201. const currentRoute = routes[routes.length - 1];
  202. // If we're in the tag details page ("/tags/:tagKey/")
  203. if (router.params.tagKey) {
  204. return Tab.TAGS;
  205. }
  206. return (
  207. Object.values(Tab).find(tab => currentRoute.path === TabPaths[tab]) ?? Tab.DETAILS
  208. );
  209. }
  210. getCurrentRouteInfo(group: Group): {baseUrl: string; currentTab: Tab} {
  211. const {organization, params} = this.props;
  212. const {event} = this.state;
  213. const currentTab = this.getCurrentTab();
  214. const baseUrl = normalizeUrl(
  215. `/organizations/${organization.slug}/issues/${group.id}/${
  216. params.eventId && event ? `events/${event.id}/` : ''
  217. }`
  218. );
  219. return {baseUrl, currentTab};
  220. }
  221. updateReprocessingProgress() {
  222. const hasReprocessingV2Feature = this.hasReprocessingV2Feature();
  223. if (!hasReprocessingV2Feature) {
  224. return;
  225. }
  226. if (this.refetchInterval) {
  227. window.clearInterval(this.refetchInterval);
  228. }
  229. this.refetchInterval = window.setInterval(this.refetchGroup, 30000);
  230. }
  231. hasReprocessingV2Feature() {
  232. const {organization} = this.props;
  233. return organization.features?.includes('reprocessing-v2');
  234. }
  235. getReprocessingNewRoute(data: Group) {
  236. const {routes, location, params} = this.props;
  237. const {groupId} = params;
  238. const {id: nextGroupId} = data;
  239. const hasReprocessingV2Feature = this.hasReprocessingV2Feature();
  240. const reprocessingStatus = getGroupReprocessingStatus(data);
  241. const {currentTab, baseUrl} = this.getCurrentRouteInfo(data);
  242. if (groupId !== nextGroupId) {
  243. if (hasReprocessingV2Feature) {
  244. // Redirects to the Activities tab
  245. if (
  246. reprocessingStatus === ReprocessingStatus.REPROCESSED_AND_HASNT_EVENT &&
  247. currentTab !== Tab.ACTIVITY
  248. ) {
  249. return {
  250. pathname: `${baseUrl}${Tab.ACTIVITY}/`,
  251. query: {...params, groupId: nextGroupId},
  252. };
  253. }
  254. }
  255. return recreateRoute('', {
  256. routes,
  257. location,
  258. params: {...params, groupId: nextGroupId},
  259. });
  260. }
  261. if (hasReprocessingV2Feature) {
  262. if (
  263. reprocessingStatus === ReprocessingStatus.REPROCESSING &&
  264. currentTab !== Tab.DETAILS
  265. ) {
  266. return {
  267. pathname: baseUrl,
  268. query: params,
  269. };
  270. }
  271. if (
  272. reprocessingStatus === ReprocessingStatus.REPROCESSED_AND_HASNT_EVENT &&
  273. currentTab !== Tab.ACTIVITY &&
  274. currentTab !== Tab.USER_FEEDBACK
  275. ) {
  276. return {
  277. pathname: `${baseUrl}${Tab.ACTIVITY}/`,
  278. query: params,
  279. };
  280. }
  281. }
  282. return undefined;
  283. }
  284. getGroupQuery(): Record<string, string | string[]> {
  285. const {environments} = this.props;
  286. // Note, we do not want to include the environment key at all if there are no environments
  287. const query: Record<string, string | string[]> = {
  288. ...(environments ? {environment: environments} : {}),
  289. expand: ['inbox', 'owners'],
  290. collapse: 'release',
  291. };
  292. return query;
  293. }
  294. getFetchDataRequestErrorType(status: any): Error {
  295. if (!status) {
  296. return null;
  297. }
  298. if (status === 404) {
  299. return ERROR_TYPES.GROUP_NOT_FOUND;
  300. }
  301. if (status === 403) {
  302. return ERROR_TYPES.MISSING_MEMBERSHIP;
  303. }
  304. return null;
  305. }
  306. handleRequestError(error: any) {
  307. Sentry.captureException(error);
  308. const errorType = this.getFetchDataRequestErrorType(error?.status);
  309. this.setState({
  310. loadingGroup: false,
  311. loading: false,
  312. error: true,
  313. errorType,
  314. });
  315. }
  316. refetchGroup = async () => {
  317. const {loadingGroup, loading, loadingEvent, group} = this.state;
  318. if (
  319. group?.status !== ReprocessingStatus.REPROCESSING ||
  320. loadingGroup ||
  321. loading ||
  322. loadingEvent
  323. ) {
  324. return;
  325. }
  326. const {api} = this.props;
  327. this.setState({loadingGroup: true});
  328. try {
  329. const updatedGroup = await api.requestPromise(this.groupDetailsEndpoint, {
  330. query: this.getGroupQuery(),
  331. });
  332. const reprocessingNewRoute = this.getReprocessingNewRoute(updatedGroup);
  333. if (reprocessingNewRoute) {
  334. browserHistory.push(reprocessingNewRoute);
  335. return;
  336. }
  337. this.setState({group: updatedGroup, loadingGroup: false});
  338. } catch (error) {
  339. this.handleRequestError(error);
  340. }
  341. };
  342. async fetchGroupReleases() {
  343. const {api} = this.props;
  344. const releases = await api.requestPromise(this.groupReleaseEndpoint);
  345. GroupStore.onPopulateReleases(this.props.params.groupId, releases);
  346. }
  347. async fetchData(trackView = false) {
  348. const {api, isGlobalSelectionReady, organization, params} = this.props;
  349. // Need to wait for global selection store to be ready before making request
  350. if (!isGlobalSelectionReady) {
  351. return;
  352. }
  353. try {
  354. const eventPromise = this.canLoadEventEarly(this.props)
  355. ? this.getEvent()
  356. : undefined;
  357. const groupPromise = await api.requestPromise(this.groupDetailsEndpoint, {
  358. query: this.getGroupQuery(),
  359. });
  360. const [data] = await Promise.all([groupPromise, eventPromise]);
  361. const groupReleasePromise = this.fetchGroupReleases();
  362. const reprocessingNewRoute = this.getReprocessingNewRoute(data);
  363. if (reprocessingNewRoute) {
  364. browserHistory.push(reprocessingNewRoute);
  365. return;
  366. }
  367. const project = this.props.projects.find(p => p.id === data.project.id);
  368. if (!project) {
  369. Sentry.withScope(scope => {
  370. const projectIds = this.props.projects.map(item => item.id);
  371. scope.setContext('missingProject', {
  372. projectId: data.project.id,
  373. availableProjects: projectIds,
  374. });
  375. Sentry.captureException(new Error('Project not found'));
  376. });
  377. } else {
  378. markEventSeen(api, organization.slug, project.slug, params.groupId);
  379. const locationWithProject = {...this.props.location};
  380. if (
  381. locationWithProject.query.project === undefined &&
  382. locationWithProject.query._allp === undefined
  383. ) {
  384. // We use _allp as a temporary measure to know they came from the
  385. // issue list page with no project selected (all projects included in
  386. // filter).
  387. //
  388. // If it is not defined, we add the locked project id to the URL
  389. // (this is because if someone navigates directly to an issue on
  390. // single-project priveleges, then goes back - they were getting
  391. // assigned to the first project).
  392. //
  393. // If it is defined, we do not so that our back button will bring us
  394. // to the issue list page with no project selected instead of the
  395. // locked project.
  396. locationWithProject.query = {...locationWithProject.query, project: project.id};
  397. }
  398. // We delete _allp from the URL to keep the hack a bit cleaner, but
  399. // this is not an ideal solution and will ultimately be replaced with
  400. // something smarter.
  401. delete locationWithProject.query._allp;
  402. browserHistory.replace(locationWithProject);
  403. }
  404. this.setState({project: project || data.project, loadingGroup: false});
  405. GroupStore.loadInitialData([data]);
  406. if (trackView) {
  407. // make sure releases have loaded before we track the view
  408. groupReleasePromise.then(() => project && this.trackView(project));
  409. }
  410. } catch (error) {
  411. this.handleRequestError(error);
  412. }
  413. }
  414. listener = GroupStore.listen(itemIds => this.onGroupChange(itemIds), undefined);
  415. onGroupChange(itemIds: Set<string>) {
  416. const id = this.props.params.groupId;
  417. if (itemIds.has(id)) {
  418. const group = GroupStore.get(id) as Group;
  419. if (group) {
  420. // TODO(ts) This needs a better approach. issueActions is splicing attributes onto
  421. // group objects to cheat here.
  422. if ((group as Group & {stale?: boolean}).stale) {
  423. this.fetchData();
  424. return;
  425. }
  426. this.setState({
  427. group,
  428. });
  429. }
  430. }
  431. }
  432. getTitle() {
  433. const {organization} = this.props;
  434. const {group} = this.state;
  435. const defaultTitle = 'Sentry';
  436. if (!group) {
  437. return defaultTitle;
  438. }
  439. const {title} = getTitle(group, organization?.features);
  440. const message = getMessage(group);
  441. const {project} = group;
  442. const eventDetails = `${organization.slug} - ${project.slug}`;
  443. if (title && message) {
  444. return `${title}: ${message} - ${eventDetails}`;
  445. }
  446. return `${title || message || defaultTitle} - ${eventDetails}`;
  447. }
  448. tabClickAnalyticsEvent(tab: Tab) {
  449. const {organization} = this.props;
  450. const {project, group, event} = this.state;
  451. if (!project || !group) {
  452. return;
  453. }
  454. trackAdvancedAnalyticsEvent('issue_details.tab_changed', {
  455. organization,
  456. project_id: parseInt(project.id, 10),
  457. tab,
  458. ...getAnalyticsDataForGroup(group),
  459. });
  460. if (group.issueCategory !== IssueCategory.ERROR) {
  461. return;
  462. }
  463. const analyticsData = event
  464. ? event.tags
  465. .filter(({key}) => ['device', 'os', 'browser'].includes(key))
  466. .reduce((acc, {key, value}) => {
  467. acc[key] = value;
  468. return acc;
  469. }, {})
  470. : {};
  471. trackAdvancedAnalyticsEvent('issue_group_details.tab.clicked', {
  472. organization,
  473. tab,
  474. platform: project.platform,
  475. ...analyticsData,
  476. });
  477. }
  478. renderError() {
  479. const {projects, location} = this.props;
  480. const projectId = location.query.project;
  481. const project = projects.find(proj => proj.id === projectId);
  482. switch (this.state.errorType) {
  483. case ERROR_TYPES.GROUP_NOT_FOUND:
  484. return (
  485. <StyledLoadingError
  486. message={t('The issue you were looking for was not found.')}
  487. />
  488. );
  489. case ERROR_TYPES.MISSING_MEMBERSHIP:
  490. return (
  491. <MissingProjectMembership
  492. organization={this.props.organization}
  493. project={project}
  494. />
  495. );
  496. default:
  497. return <StyledLoadingError onRetry={this.remountComponent} />;
  498. }
  499. }
  500. renderContent(project: AvatarProject, group: Group) {
  501. const {children, environments, organization, router} = this.props;
  502. const {loadingEvent, eventError, event} = this.state;
  503. const {currentTab, baseUrl} = this.getCurrentRouteInfo(group);
  504. const groupReprocessingStatus = getGroupReprocessingStatus(group);
  505. let childProps: Record<string, any> = {
  506. environments,
  507. group,
  508. project,
  509. };
  510. if (currentTab === Tab.DETAILS) {
  511. if (group.id !== event?.groupID && !eventError) {
  512. // if user pastes only the event id into the url, but it's from another group, redirect to correct group/event
  513. const redirectUrl = `/organizations/${organization.slug}/issues/${event?.groupID}/events/${event?.id}/`;
  514. router.push(normalizeUrl(redirectUrl));
  515. } else {
  516. childProps = {
  517. ...childProps,
  518. event,
  519. loadingEvent,
  520. eventError,
  521. groupReprocessingStatus,
  522. onRetry: () => this.remountComponent(),
  523. };
  524. }
  525. }
  526. if (currentTab === Tab.TAGS) {
  527. childProps = {...childProps, event, baseUrl};
  528. }
  529. return (
  530. <Tabs value={currentTab} onChange={tab => this.tabClickAnalyticsEvent(tab)}>
  531. <GroupHeader
  532. organization={organization}
  533. groupReprocessingStatus={groupReprocessingStatus}
  534. event={event}
  535. group={group}
  536. baseUrl={baseUrl}
  537. project={project as Project}
  538. />
  539. <GroupTabPanels>
  540. <TabPanels.Item key={currentTab}>
  541. {isValidElement(children) ? cloneElement(children, childProps) : children}
  542. </TabPanels.Item>
  543. </GroupTabPanels>
  544. </Tabs>
  545. );
  546. }
  547. renderPageContent() {
  548. const {error: isError, group, project, loading} = this.state;
  549. const isLoading = loading || (!group && !isError);
  550. if (isLoading) {
  551. return <LoadingIndicator />;
  552. }
  553. if (isError) {
  554. return this.renderError();
  555. }
  556. const {organization} = this.props;
  557. return (
  558. <Projects
  559. orgId={organization.slug}
  560. slugs={[project?.slug ?? '']}
  561. data-test-id="group-projects-container"
  562. >
  563. {({projects, initiallyLoaded, fetchError}) =>
  564. initiallyLoaded ? (
  565. fetchError ? (
  566. <StyledLoadingError message={t('Error loading the specified project')} />
  567. ) : (
  568. // TODO(ts): Update renderContent function to deal with empty group
  569. // Search for the slug in the projects list if possible. This is because projects
  570. // is just a complete list of stored projects and the first element may not be
  571. // the expected project.
  572. this.renderContent(
  573. (project?.slug
  574. ? projects.find(({slug}) => slug === project?.slug)
  575. : undefined) ?? projects[0],
  576. group!
  577. )
  578. )
  579. ) : (
  580. <LoadingIndicator />
  581. )
  582. }
  583. </Projects>
  584. );
  585. }
  586. render() {
  587. const {project, group} = this.state;
  588. const {organization} = this.props;
  589. const isSampleError = group?.tags?.some(tag => tag.key === 'sample_event');
  590. return (
  591. <Fragment>
  592. {isSampleError && project && (
  593. <SampleEventAlert project={project} organization={organization} />
  594. )}
  595. <SentryDocumentTitle noSuffix title={this.getTitle()}>
  596. <PageFiltersContainer
  597. skipLoadLastUsed
  598. forceProject={project}
  599. shouldForceProject
  600. >
  601. {this.renderPageContent()}
  602. </PageFiltersContainer>
  603. </SentryDocumentTitle>
  604. </Fragment>
  605. );
  606. }
  607. }
  608. export default withRouteAnalytics(withApi(Sentry.withProfiler(GroupDetails)));
  609. const StyledLoadingError = styled(LoadingError)`
  610. margin: ${space(2)};
  611. `;
  612. const GroupTabPanels = styled(TabPanels)`
  613. flex-grow: 1;
  614. display: flex;
  615. flex-direction: column;
  616. justify-content: stretch;
  617. `;