mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
* operation lifecycle accordion * operation entity * adapt layout to mobile device * basic operations view * pass response data to operation details * update types package * tac operation status and links to tx on ton * feature config, docs and operation badge * add info to tx page * add operations to search * search input on operations page * tests * update tooltips and temporary fix of ts * add InterFallback typeface with → glyph * design and api updates * support new API version * add time format toggle * add shield to entity icon * minor fixes * update screenshots * clean up * fix screenshot
37 lines
1.0 KiB
TypeScript
37 lines
1.0 KiB
TypeScript
import type { UseQueryResult } from '@tanstack/react-query';
|
|
import React from 'react';
|
|
|
|
import type * as tac from '@blockscout/tac-operation-lifecycle-types';
|
|
|
|
import type { ResourceError } from 'lib/api/resources';
|
|
import TestnetWarning from 'ui/shared/alerts/TestnetWarning';
|
|
import DataFetchAlert from 'ui/shared/DataFetchAlert';
|
|
|
|
import TxInfo from './details/TxInfo';
|
|
import type { TxQuery } from './useTxQuery';
|
|
|
|
interface Props {
|
|
txQuery: TxQuery;
|
|
tacOperationQuery?: UseQueryResult<tac.OperationsFullResponse, ResourceError>;
|
|
}
|
|
|
|
const TxDetails = ({ txQuery, tacOperationQuery }: Props) => {
|
|
if (txQuery.isError) {
|
|
return <DataFetchAlert/>;
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<TestnetWarning mb={ 6 } isLoading={ txQuery.isPlaceholderData }/>
|
|
<TxInfo
|
|
data={ txQuery.data }
|
|
tacOperations={ tacOperationQuery?.data?.items }
|
|
isLoading={ txQuery.isPlaceholderData || (tacOperationQuery?.isPlaceholderData ?? false) }
|
|
socketStatus={ txQuery.socketStatus }
|
|
/>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default React.memo(TxDetails);
|