Files
explore/ui/operation/tac/TacOperationLifecycleAccordionItemContent.tsx
tom goriunovandGitHub e6b7dbe3e0 Fixes for Release v2.7.0 (#3310)
* fix: correct optional chaining in label-issues-in-release workflow

- Updated the filter condition to ensure proper handling of optional chaining for issue labels when label doesn't have a description

* add reown to ignored origins of errors in rollbar monitoring

* export HintProps

* add recipe for Code component and adjust select component props

* fix screenshots

* fix validator schema for multichain explorer

* fix mobile lists in safari

* screenshot update

* deprecate NEXT_PUBLIC_ROLLUP_L1_BASE_URL env

* add support of new Tac operation type

* remove recaptcha token from query params

* add skin for multichain

* update multichain config

* fix: og meta tags were not rendered on the server

* enable NEXT_PUBLIC_VIEWS_ADDRESS_IDENTICON_TYPE var for multichain

* disable e2e test job
2026-03-02 13:52:09 +01:00

73 lines
2.2 KiB
TypeScript

import { Box } from '@chakra-ui/react';
import React from 'react';
import * as tac from '@blockscout/tac-operation-lifecycle-types';
import DetailedInfoTimestamp from 'ui/shared/DetailedInfo/DetailedInfoTimestamp';
import TxEntity from 'ui/shared/entities/tx/TxEntity';
import TxEntityTon from 'ui/shared/entities/tx/TxEntityTon';
import { ItemContent, ItemBody, ItemRow } from 'ui/shared/lifecycle/LifecycleAccordion';
import StatusTag from 'ui/shared/statusTag/StatusTag';
interface Props {
isLast: boolean;
data: tac.OperationStage;
}
const TacOperationLifecycleAccordionItemContent = ({ isLast, data }: Props) => {
return (
<ItemContent isLast={ isLast }>
<ItemBody>
<ItemRow label="Status">
<StatusTag type={ data.is_success ? 'ok' : 'error' } text={ data.is_success ? 'Success' : 'Failed' } my={ 1 }/>
</ItemRow>
{ data.timestamp && (
<ItemRow label="Timestamp">
<DetailedInfoTimestamp timestamp={ data.timestamp } isLoading={ false } flexWrap={{ base: 'wrap', lg: 'nowrap' }} py="6px"/>
</ItemRow>
) }
{ data.transactions.length > 0 && (
<ItemRow label="Transactions">
<Box
display="flex"
flexDirection="column"
rowGap={ 3 }
py="6px"
width="100%"
overflow="hidden"
>
{
data.transactions.map((tx) => {
if (tx.type === tac.BlockchainType.TON) {
return <TxEntityTon key={ tx.hash } hash={ tx.hash }/>;
}
return <TxEntity key={ tx.hash } hash={ tx.hash } icon={{ name: 'brands/tac' }}/>;
})
}
</Box>
</ItemRow>
) }
{ data.note && (
<ItemRow label="Note">
<Box
display="inline-flex"
alignItems="center"
py="6px"
whiteSpace="pre-wrap"
wordBreak="break-word"
>
{ data.note }
</Box>
</ItemRow>
) }
</ItemBody>
</ItemContent>
);
};
export default React.memo(TacOperationLifecycleAccordionItemContent);