Skip to content

Commit

Permalink
Tracker card and progress bar initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
MRVDH committed Aug 14, 2023
1 parent 02dc87e commit ae6e364
Showing 1 changed file with 39 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
Grid,
Heading,
ProductIcon,
ProgressBar,
SystemIcon,
Table,
Text,
Expand Down Expand Up @@ -43,6 +44,7 @@ const CheckTransactions: FC = () => {

const [results, setResults] = useState<ITransaction[]>([]);
const [loadingState, setLoadingState] = useState<boolean>(true);
const [transactionDetails, setTransactionDetails] = useState<ITransaction>();

const transactionDetailsRef = useRef<HTMLElement | null>(null);

Expand Down Expand Up @@ -132,7 +134,7 @@ const CheckTransactions: FC = () => {
}

const handleOpenTransactionDetails = (result: ITransaction): void => {
console.log(result);
setTransactionDetails(result);
// @ts-ignore
transactionDetailsRef.openSection(0);
};
Expand All @@ -150,14 +152,47 @@ const CheckTransactions: FC = () => {
<TrackerCard
labelValues={[
{
label: 'Transaction Hash',
value: '0x1234567890',
label: 'Sender',
value: transactionDetails?.fromAccount,
isAccount: true,
},
{
label: 'From chain',
value: transactionDetails?.chain,
},
]}
variant="vertical"
icon={ProductIcon.QuickStart}
/>
<Box marginBottom="$5" />
<ProgressBar
checkpoints={[
{
title: 'Initiated transaction',
status: 'complete',
},
{
title: 'Transaction complete',
status: 'complete',
},
]}
/>
<Box marginBottom="$2" />
<TrackerCard
labelValues={[
{
label: 'Receiver',
value: transactionDetails?.fromAccount,
isAccount: true,
},
{
label: 'to chain',
value:
transactionDetails?.crossChainId ||
transactionDetails?.chain,
},
]}
icon={ProductIcon.ReceiverInactive}
/>
</>
),
},
Expand Down

0 comments on commit ae6e364

Please sign in to comment.