Files
explore/ui/operation/tac/TacOperationLifecycleAccordion.tsx
zeekay da79f9e711 feat: rename @blockscout to @luxfi, monochrome theme, horizontal blocks
- Rename all @blockscout/* npm packages to @luxfi/* aliases (150+ files)
- Override blue accent colors to gray for monochrome theme
- Fix dropdown/menu/popover fonts to use Geist Sans
- Change Latest Blocks to horizontal scrolling layout
- Show dashes instead of zeros for validator stats on error
- Fix GHA deploy step to use correct deployment name
2026-03-02 12:28:15 -08:00

56 lines
1.5 KiB
TypeScript

import React from 'react';
import * as tac from '@luxfi/tac-operation-lifecycle-types';
import { STATUS_LABELS } from 'lib/operations/tac';
import { Root, Item, Trigger } from 'ui/shared/lifecycle/LifecycleAccordion';
import TacOperationLifecycleAccordionItemContent from './TacOperationLifecycleAccordionItemContent';
interface Props {
data: tac.OperationDetails['status_history'];
isLoading?: boolean;
type: tac.OperationType;
}
const TacOperationLifecycleAccordion = ({ data, isLoading, type }: Props) => {
const isPending = type === tac.OperationType.PENDING && !isLoading;
return (
<Root>
{ data.map((item, index) => {
const isLast = index === data.length - 1 && !isPending;
return (
<Item key={ index } value={ item.type }>
<Trigger
status={ item.is_success ? 'success' : 'error' }
text={ STATUS_LABELS[item.type] }
isFirst={ index === 0 }
isLast={ isLast }
isLoading={ isLoading }
/>
<TacOperationLifecycleAccordionItemContent
isLast={ isLast }
data={ item }
/>
</Item>
);
}) }
{ isPending && (
<Item value="pending">
<Trigger
status="pending"
text="Pending"
isFirst={ false }
isLast={ true }
isLoading={ isLoading }
isDisabled
/>
</Item>
) }
</Root>
);
};
export default React.memo(TacOperationLifecycleAccordion);