changedTransactions.tsx 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  1. import {Fragment} from 'react';
  2. import {browserHistory} from 'react-router';
  3. import styled from '@emotion/styled';
  4. import {Location} from 'history';
  5. import {Client} from 'sentry/api';
  6. import {Button} from 'sentry/components/button';
  7. import {HeaderTitleLegend} from 'sentry/components/charts/styles';
  8. import Count from 'sentry/components/count';
  9. import DropdownLink from 'sentry/components/dropdownLink';
  10. import Duration from 'sentry/components/duration';
  11. import EmptyStateWarning from 'sentry/components/emptyStateWarning';
  12. import {RadioLineItem} from 'sentry/components/forms/controls/radioGroup';
  13. import IdBadge from 'sentry/components/idBadge';
  14. import Link from 'sentry/components/links/link';
  15. import LoadingIndicator from 'sentry/components/loadingIndicator';
  16. import MenuItem from 'sentry/components/menuItem';
  17. import Pagination, {CursorHandler} from 'sentry/components/pagination';
  18. import {Panel} from 'sentry/components/panels';
  19. import QuestionTooltip from 'sentry/components/questionTooltip';
  20. import Radio from 'sentry/components/radio';
  21. import {Tooltip} from 'sentry/components/tooltip';
  22. import {IconArrow, IconEllipsis} from 'sentry/icons';
  23. import {t} from 'sentry/locale';
  24. import {space} from 'sentry/styles/space';
  25. import {AvatarProject, Organization, Project} from 'sentry/types';
  26. import {trackAnalytics} from 'sentry/utils/analytics';
  27. import {formatPercentage, getDuration} from 'sentry/utils/formatters';
  28. import {useMetricsCardinalityContext} from 'sentry/utils/performance/contexts/metricsCardinality';
  29. import TrendsDiscoverQuery from 'sentry/utils/performance/trends/trendsDiscoverQuery';
  30. import {decodeScalar} from 'sentry/utils/queryString';
  31. import {MutableSearch} from 'sentry/utils/tokenizeSearch';
  32. import useApi from 'sentry/utils/useApi';
  33. import withOrganization from 'sentry/utils/withOrganization';
  34. import withProjects from 'sentry/utils/withProjects';
  35. import {
  36. DisplayModes,
  37. transactionSummaryRouteWithQuery,
  38. } from 'sentry/views/performance/transactionSummary/utils';
  39. import Chart from './chart';
  40. import {
  41. NormalizedTrendsTransaction,
  42. TrendChangeType,
  43. TrendColumnField,
  44. TrendFunctionField,
  45. TrendsStats,
  46. TrendView,
  47. } from './types';
  48. import {
  49. getCurrentTrendFunction,
  50. getCurrentTrendParameter,
  51. getSelectedQueryKey,
  52. getTrendProjectId,
  53. modifyTrendView,
  54. normalizeTrends,
  55. transformDeltaSpread,
  56. transformValueDelta,
  57. trendCursorNames,
  58. trendToColor,
  59. } from './utils';
  60. type Props = {
  61. location: Location;
  62. organization: Organization;
  63. projects: Project[];
  64. setError: (msg: string | undefined) => void;
  65. trendChangeType: TrendChangeType;
  66. trendView: TrendView;
  67. previousTrendColumn?: TrendColumnField;
  68. previousTrendFunction?: TrendFunctionField;
  69. withBreakpoint?: boolean;
  70. };
  71. type TrendsCursorQuery = {
  72. improvedCursor?: string;
  73. regressionCursor?: string;
  74. };
  75. const makeTrendsCursorHandler =
  76. (trendChangeType: TrendChangeType): CursorHandler =>
  77. (cursor, path, query) => {
  78. const cursorQuery = {} as TrendsCursorQuery;
  79. if (trendChangeType === TrendChangeType.IMPROVED) {
  80. cursorQuery.improvedCursor = cursor;
  81. } else if (trendChangeType === TrendChangeType.REGRESSION) {
  82. cursorQuery.regressionCursor = cursor;
  83. }
  84. const selectedQueryKey = getSelectedQueryKey(trendChangeType);
  85. delete query[selectedQueryKey];
  86. browserHistory.push({
  87. pathname: path,
  88. query: {...query, ...cursorQuery},
  89. });
  90. };
  91. function getChartTitle(trendChangeType: TrendChangeType): string {
  92. switch (trendChangeType) {
  93. case TrendChangeType.IMPROVED:
  94. return t('Most Improved Transactions');
  95. case TrendChangeType.REGRESSION:
  96. return t('Most Regressed Transactions');
  97. default:
  98. throw new Error('No trend type passed');
  99. }
  100. }
  101. function getSelectedTransaction(
  102. location: Location,
  103. trendChangeType: TrendChangeType,
  104. transactions?: NormalizedTrendsTransaction[]
  105. ): NormalizedTrendsTransaction | undefined {
  106. const queryKey = getSelectedQueryKey(trendChangeType);
  107. const selectedTransactionName = decodeScalar(location.query[queryKey]);
  108. if (!transactions) {
  109. return undefined;
  110. }
  111. const selectedTransaction = transactions.find(
  112. transaction =>
  113. `${transaction.transaction}-${transaction.project}` === selectedTransactionName
  114. );
  115. if (selectedTransaction) {
  116. return selectedTransaction;
  117. }
  118. return transactions.length > 0 ? transactions[0] : undefined;
  119. }
  120. function handleChangeSelected(
  121. location: Location,
  122. organization: Organization,
  123. trendChangeType: TrendChangeType
  124. ) {
  125. return function updateSelected(transaction?: NormalizedTrendsTransaction) {
  126. const selectedQueryKey = getSelectedQueryKey(trendChangeType);
  127. const query = {
  128. ...location.query,
  129. };
  130. if (!transaction) {
  131. delete query[selectedQueryKey];
  132. } else {
  133. query[selectedQueryKey] = transaction
  134. ? `${transaction.transaction}-${transaction.project}`
  135. : undefined;
  136. }
  137. browserHistory.push({
  138. pathname: location.pathname,
  139. query,
  140. });
  141. trackAnalytics('performance_views.trends.widget_interaction', {
  142. organization,
  143. widget_type: trendChangeType,
  144. });
  145. };
  146. }
  147. enum FilterSymbols {
  148. GREATER_THAN_EQUALS = '>=',
  149. LESS_THAN_EQUALS = '<=',
  150. }
  151. function handleFilterTransaction(location: Location, transaction: string) {
  152. const queryString = decodeScalar(location.query.query);
  153. const conditions = new MutableSearch(queryString ?? '');
  154. conditions.addFilterValues('!transaction', [transaction]);
  155. const query = conditions.formatString();
  156. browserHistory.push({
  157. pathname: location.pathname,
  158. query: {
  159. ...location.query,
  160. query: String(query).trim(),
  161. },
  162. });
  163. }
  164. function handleFilterDuration(
  165. location: Location,
  166. organization: Organization,
  167. value: number,
  168. symbol: FilterSymbols,
  169. trendChangeType: TrendChangeType,
  170. projects: Project[],
  171. projectIds: Readonly<number[]>
  172. ) {
  173. const durationTag = getCurrentTrendParameter(location, projects, projectIds).column;
  174. const queryString = decodeScalar(location.query.query);
  175. const conditions = new MutableSearch(queryString ?? '');
  176. const existingValues = conditions.getFilterValues(durationTag);
  177. const alternateSymbol = symbol === FilterSymbols.GREATER_THAN_EQUALS ? '>' : '<';
  178. if (existingValues) {
  179. existingValues.forEach(existingValue => {
  180. if (existingValue.startsWith(symbol) || existingValue.startsWith(alternateSymbol)) {
  181. conditions.removeFilterValue(durationTag, existingValue);
  182. }
  183. });
  184. }
  185. conditions.addFilterValues(durationTag, [`${symbol}${value}`]);
  186. const query = conditions.formatString();
  187. browserHistory.push({
  188. pathname: location.pathname,
  189. query: {
  190. ...location.query,
  191. query: String(query).trim(),
  192. },
  193. });
  194. trackAnalytics('performance_views.trends.change_duration', {
  195. organization,
  196. widget_type: getChartTitle(trendChangeType),
  197. value: `${symbol}${value}`,
  198. });
  199. }
  200. function ChangedTransactions(props: Props) {
  201. const {
  202. location,
  203. trendChangeType,
  204. previousTrendFunction,
  205. previousTrendColumn,
  206. organization,
  207. projects,
  208. setError,
  209. withBreakpoint,
  210. } = props;
  211. const api = useApi();
  212. const {isLoading: isCardinalityCheckLoading, outcome} = useMetricsCardinalityContext();
  213. const trendView = props.trendView.clone();
  214. const chartTitle = getChartTitle(trendChangeType);
  215. modifyTrendView(trendView, location, trendChangeType, projects, organization);
  216. const onCursor = makeTrendsCursorHandler(trendChangeType);
  217. const cursor = decodeScalar(location.query[trendCursorNames[trendChangeType]]);
  218. const paginationAnalyticsEvent = (direction: string) => {
  219. trackAnalytics('performance_views.trends.widget_pagination', {
  220. organization,
  221. direction,
  222. widget_type: getChartTitle(trendChangeType),
  223. });
  224. };
  225. return (
  226. <TrendsDiscoverQuery
  227. eventView={trendView}
  228. orgSlug={organization.slug}
  229. location={location}
  230. trendChangeType={trendChangeType}
  231. cursor={cursor}
  232. limit={5}
  233. setError={error => setError(error?.message)}
  234. withBreakpoint={withBreakpoint && !outcome?.forceTransactionsOnly}
  235. >
  236. {({isLoading, trendsData, pageLinks}) => {
  237. const trendFunction = getCurrentTrendFunction(location);
  238. const trendParameter = getCurrentTrendParameter(
  239. location,
  240. projects,
  241. trendView.project
  242. );
  243. const events = normalizeTrends(
  244. (trendsData && trendsData.events && trendsData.events.data) || []
  245. );
  246. const selectedTransaction = getSelectedTransaction(
  247. location,
  248. trendChangeType,
  249. events
  250. );
  251. const statsData = trendsData?.stats || {};
  252. const transactionsList = events && events.slice ? events.slice(0, 5) : [];
  253. const currentTrendFunction =
  254. isLoading && previousTrendFunction
  255. ? previousTrendFunction
  256. : trendFunction.field;
  257. const currentTrendColumn =
  258. isLoading && previousTrendColumn ? previousTrendColumn : trendParameter.column;
  259. const titleTooltipContent = t(
  260. 'This compares the baseline (%s) of the past with the present.',
  261. trendFunction.legendLabel
  262. );
  263. return (
  264. <TransactionsListContainer data-test-id="changed-transactions">
  265. <TrendsTransactionPanel>
  266. <StyledHeaderTitleLegend>
  267. {chartTitle}
  268. <QuestionTooltip size="sm" position="top" title={titleTooltipContent} />
  269. </StyledHeaderTitleLegend>
  270. {isLoading || isCardinalityCheckLoading ? (
  271. <LoadingIndicator
  272. style={{
  273. margin: '237px auto',
  274. }}
  275. />
  276. ) : (
  277. <Fragment>
  278. {transactionsList.length ? (
  279. <Fragment>
  280. <ChartContainer>
  281. <Chart
  282. statsData={statsData}
  283. query={trendView.query}
  284. project={trendView.project}
  285. environment={trendView.environment}
  286. start={trendView.start}
  287. end={trendView.end}
  288. statsPeriod={trendView.statsPeriod}
  289. transaction={selectedTransaction}
  290. isLoading={isLoading}
  291. {...props}
  292. />
  293. </ChartContainer>
  294. {transactionsList.map((transaction, index) => (
  295. <TrendsListItem
  296. api={api}
  297. currentTrendFunction={currentTrendFunction}
  298. currentTrendColumn={currentTrendColumn}
  299. trendView={props.trendView}
  300. organization={organization}
  301. transaction={transaction}
  302. key={transaction.transaction}
  303. index={index}
  304. trendChangeType={trendChangeType}
  305. transactions={transactionsList}
  306. location={location}
  307. projects={projects}
  308. statsData={statsData}
  309. handleSelectTransaction={handleChangeSelected(
  310. location,
  311. organization,
  312. trendChangeType
  313. )}
  314. />
  315. ))}
  316. </Fragment>
  317. ) : (
  318. <StyledEmptyStateWarning small>
  319. {t('No results')}
  320. </StyledEmptyStateWarning>
  321. )}
  322. </Fragment>
  323. )}
  324. </TrendsTransactionPanel>
  325. <Pagination
  326. pageLinks={pageLinks}
  327. onCursor={onCursor}
  328. paginationAnalyticsEvent={paginationAnalyticsEvent}
  329. />
  330. </TransactionsListContainer>
  331. );
  332. }}
  333. </TrendsDiscoverQuery>
  334. );
  335. }
  336. type TrendsListItemProps = {
  337. api: Client;
  338. currentTrendColumn: string;
  339. currentTrendFunction: string;
  340. handleSelectTransaction: (transaction: NormalizedTrendsTransaction) => void;
  341. index: number;
  342. location: Location;
  343. organization: Organization;
  344. projects: Project[];
  345. statsData: TrendsStats;
  346. transaction: NormalizedTrendsTransaction;
  347. transactions: NormalizedTrendsTransaction[];
  348. trendChangeType: TrendChangeType;
  349. trendView: TrendView;
  350. };
  351. function TrendsListItem(props: TrendsListItemProps) {
  352. const {
  353. transaction,
  354. transactions,
  355. trendChangeType,
  356. currentTrendFunction,
  357. currentTrendColumn,
  358. index,
  359. location,
  360. organization,
  361. projects,
  362. handleSelectTransaction,
  363. trendView,
  364. } = props;
  365. const color = trendToColor[trendChangeType].default;
  366. const selectedTransaction = getSelectedTransaction(
  367. location,
  368. trendChangeType,
  369. transactions
  370. );
  371. const isSelected = selectedTransaction === transaction;
  372. const project = projects.find(
  373. ({slug}) => slug === transaction.project
  374. ) as AvatarProject;
  375. const currentPeriodValue = transaction.aggregate_range_2;
  376. const previousPeriodValue = transaction.aggregate_range_1;
  377. const absolutePercentChange = formatPercentage(
  378. Math.abs(transaction.trend_percentage - 1),
  379. 0
  380. );
  381. const previousDuration = getDuration(
  382. previousPeriodValue / 1000,
  383. previousPeriodValue < 1000 && previousPeriodValue > 10 ? 0 : 2
  384. );
  385. const currentDuration = getDuration(
  386. currentPeriodValue / 1000,
  387. currentPeriodValue < 1000 && currentPeriodValue > 10 ? 0 : 2
  388. );
  389. const percentChangeExplanation = t(
  390. 'Over this period, the %s for %s has %s %s from %s to %s',
  391. currentTrendFunction,
  392. currentTrendColumn,
  393. trendChangeType === TrendChangeType.IMPROVED ? t('decreased') : t('increased'),
  394. absolutePercentChange,
  395. previousDuration,
  396. currentDuration
  397. );
  398. const longestPeriodValue =
  399. trendChangeType === TrendChangeType.IMPROVED
  400. ? previousPeriodValue
  401. : currentPeriodValue;
  402. const longestDuration =
  403. trendChangeType === TrendChangeType.IMPROVED ? previousDuration : currentDuration;
  404. return (
  405. <ListItemContainer data-test-id={'trends-list-item-' + trendChangeType}>
  406. <ItemRadioContainer color={color}>
  407. {transaction.count_range_1 && transaction.count_range_2 ? (
  408. <Tooltip
  409. title={
  410. <TooltipContent>
  411. <span>{t('Total Events')}</span>
  412. <span>
  413. <Count value={transaction.count_range_1} />
  414. <StyledIconArrow direction="right" size="xs" />
  415. <Count value={transaction.count_range_2} />
  416. </span>
  417. </TooltipContent>
  418. }
  419. disableForVisualTest // Disabled tooltip in snapshots because of overlap order issues.
  420. >
  421. <RadioLineItem index={index} role="radio">
  422. <Radio
  423. checked={isSelected}
  424. onChange={() => handleSelectTransaction(transaction)}
  425. />
  426. </RadioLineItem>
  427. </Tooltip>
  428. ) : (
  429. <RadioLineItem index={index} role="radio">
  430. <Radio
  431. checked={isSelected}
  432. onChange={() => handleSelectTransaction(transaction)}
  433. />
  434. </RadioLineItem>
  435. )}
  436. </ItemRadioContainer>
  437. <TransactionSummaryLink {...props} />
  438. <ItemTransactionPercentage>
  439. <Tooltip title={percentChangeExplanation}>
  440. <Fragment>
  441. {trendChangeType === TrendChangeType.REGRESSION ? '+' : ''}
  442. {formatPercentage(transaction.trend_percentage - 1, 0)}
  443. </Fragment>
  444. </Tooltip>
  445. </ItemTransactionPercentage>
  446. <DropdownLink
  447. caret={false}
  448. anchorRight
  449. title={
  450. <StyledButton
  451. size="xs"
  452. icon={<IconEllipsis data-test-id="trends-item-action" size="xs" />}
  453. aria-label={t('Actions')}
  454. />
  455. }
  456. >
  457. {!organization.features.includes('performance-new-trends') && (
  458. <Fragment>
  459. <MenuItem
  460. onClick={() =>
  461. handleFilterDuration(
  462. location,
  463. organization,
  464. longestPeriodValue,
  465. FilterSymbols.LESS_THAN_EQUALS,
  466. trendChangeType,
  467. projects,
  468. trendView.project
  469. )
  470. }
  471. >
  472. <MenuAction>{t('Show \u2264 %s', longestDuration)}</MenuAction>
  473. </MenuItem>
  474. <MenuItem
  475. onClick={() =>
  476. handleFilterDuration(
  477. location,
  478. organization,
  479. longestPeriodValue,
  480. FilterSymbols.GREATER_THAN_EQUALS,
  481. trendChangeType,
  482. projects,
  483. trendView.project
  484. )
  485. }
  486. >
  487. <MenuAction>{t('Show \u2265 %s', longestDuration)}</MenuAction>
  488. </MenuItem>
  489. </Fragment>
  490. )}
  491. <MenuItem
  492. onClick={() => handleFilterTransaction(location, transaction.transaction)}
  493. >
  494. <MenuAction>{t('Hide from list')}</MenuAction>
  495. </MenuItem>
  496. </DropdownLink>
  497. <ItemTransactionDurationChange>
  498. {project && (
  499. <Tooltip title={transaction.project}>
  500. <IdBadge avatarSize={16} project={project} hideName />
  501. </Tooltip>
  502. )}
  503. <CompareDurations {...props} />
  504. </ItemTransactionDurationChange>
  505. <ItemTransactionStatus color={color}>
  506. <ValueDelta {...props} />
  507. </ItemTransactionStatus>
  508. </ListItemContainer>
  509. );
  510. }
  511. export function CompareDurations({
  512. transaction,
  513. }: {
  514. transaction: TrendsListItemProps['transaction'];
  515. }) {
  516. const {fromSeconds, toSeconds, showDigits} = transformDeltaSpread(
  517. transaction.aggregate_range_1,
  518. transaction.aggregate_range_2
  519. );
  520. return (
  521. <DurationChange>
  522. <Duration seconds={fromSeconds} fixedDigits={showDigits ? 1 : 0} abbreviation />
  523. <StyledIconArrow direction="right" size="xs" />
  524. <Duration seconds={toSeconds} fixedDigits={showDigits ? 1 : 0} abbreviation />
  525. </DurationChange>
  526. );
  527. }
  528. function ValueDelta({transaction, trendChangeType}: TrendsListItemProps) {
  529. const {seconds, fixedDigits, changeLabel} = transformValueDelta(
  530. transaction.trend_difference,
  531. trendChangeType
  532. );
  533. return (
  534. <span>
  535. <Duration seconds={seconds} fixedDigits={fixedDigits} abbreviation /> {changeLabel}
  536. </span>
  537. );
  538. }
  539. type TransactionSummaryLinkProps = TrendsListItemProps & {};
  540. function TransactionSummaryLink(props: TransactionSummaryLinkProps) {
  541. const {
  542. organization,
  543. trendView: eventView,
  544. transaction,
  545. projects,
  546. currentTrendFunction,
  547. currentTrendColumn,
  548. } = props;
  549. const summaryView = eventView.clone();
  550. const projectID = getTrendProjectId(transaction, projects);
  551. const target = transactionSummaryRouteWithQuery({
  552. orgSlug: organization.slug,
  553. transaction: String(transaction.transaction),
  554. query: summaryView.generateQueryStringObject(),
  555. projectID,
  556. display: DisplayModes.TREND,
  557. trendFunction: currentTrendFunction,
  558. trendColumn: currentTrendColumn,
  559. });
  560. return (
  561. <ItemTransactionName to={target} data-test-id="item-transaction-name">
  562. {transaction.transaction}
  563. </ItemTransactionName>
  564. );
  565. }
  566. const TransactionsListContainer = styled('div')`
  567. display: flex;
  568. flex-direction: column;
  569. `;
  570. const TrendsTransactionPanel = styled(Panel)`
  571. margin: 0;
  572. flex-grow: 1;
  573. `;
  574. const ChartContainer = styled('div')`
  575. padding: ${space(3)};
  576. `;
  577. const StyledHeaderTitleLegend = styled(HeaderTitleLegend)`
  578. border-radius: ${p => p.theme.borderRadius};
  579. margin: ${space(2)} ${space(3)};
  580. `;
  581. const StyledButton = styled(Button)`
  582. vertical-align: middle;
  583. `;
  584. const MenuAction = styled('div')<{['data-test-id']?: string}>`
  585. white-space: nowrap;
  586. color: ${p => p.theme.textColor};
  587. `;
  588. MenuAction.defaultProps = {
  589. 'data-test-id': 'menu-action',
  590. };
  591. const StyledEmptyStateWarning = styled(EmptyStateWarning)`
  592. min-height: 300px;
  593. justify-content: center;
  594. `;
  595. const ListItemContainer = styled('div')`
  596. display: grid;
  597. grid-template-columns: 24px auto 100px 30px;
  598. grid-template-rows: repeat(2, auto);
  599. grid-column-gap: ${space(1)};
  600. border-top: 1px solid ${p => p.theme.border};
  601. padding: ${space(1)} ${space(2)};
  602. `;
  603. const ItemRadioContainer = styled('div')`
  604. grid-row: 1/3;
  605. input {
  606. cursor: pointer;
  607. }
  608. input:checked::after {
  609. background-color: ${p => p.color};
  610. }
  611. `;
  612. const ItemTransactionName = styled(Link)`
  613. font-size: ${p => p.theme.fontSizeMedium};
  614. margin-right: ${space(1)};
  615. ${p => p.theme.overflowEllipsis};
  616. `;
  617. const ItemTransactionDurationChange = styled('div')`
  618. display: flex;
  619. align-items: center;
  620. font-size: ${p => p.theme.fontSizeSmall};
  621. `;
  622. const DurationChange = styled('span')`
  623. color: ${p => p.theme.gray300};
  624. margin: 0 ${space(1)};
  625. `;
  626. const ItemTransactionPercentage = styled('div')`
  627. text-align: right;
  628. font-size: ${p => p.theme.fontSizeMedium};
  629. `;
  630. const ItemTransactionStatus = styled('div')`
  631. color: ${p => p.color};
  632. text-align: right;
  633. font-size: ${p => p.theme.fontSizeSmall};
  634. `;
  635. const TooltipContent = styled('div')`
  636. display: flex;
  637. flex-direction: column;
  638. align-items: center;
  639. `;
  640. const StyledIconArrow = styled(IconArrow)`
  641. margin: 0 ${space(1)};
  642. `;
  643. export default withProjects(withOrganization(ChangedTransactions));