-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(explorer): rebrand tx block quick overview (#2479)
* feat: add displaystats component * feat: rename prop, updtae styles and colors * feat: add icon prop * feat: add w-full * feat: update display stats component * feat: rebrand object page * feat: add div to prevent wrong gap * feat: rebrand transaction blocks * feat: refine grid * eat: add word break and height full * feat: improve accordion * feat: improve styles * feat: add truncate and width * feat: cleanup * feat: uodate grid * feat: update modal bg * feat: refinements * feat: rebrand txblock details * minor fix * feat: bring back domainName * feat: add isTuncated to storybook * feat: update truncate --------- Co-authored-by: Begoña Alvarez <[email protected]>
- Loading branch information
1 parent
8f6ea50
commit c6c4d54
Showing
6 changed files
with
87 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 0 additions & 91 deletions
91
apps/explorer/src/pages/transaction-result/transaction-summary/TransactionDetailCard.tsx
This file was deleted.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
apps/explorer/src/pages/transaction-result/transaction-summary/TransactionDetails.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// Modifications Copyright (c) 2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { DisplayStats } from '@iota/apps-ui-kit'; | ||
import { formatDate, useResolveIotaNSName } from '@iota/core'; | ||
|
||
interface TransactionDetailsProps { | ||
sender?: string; | ||
checkpoint?: string | null; | ||
executedEpoch?: string; | ||
timestamp?: string | null; | ||
} | ||
|
||
export function TransactionDetails({ | ||
sender, | ||
checkpoint, | ||
executedEpoch, | ||
timestamp, | ||
}: TransactionDetailsProps): JSX.Element { | ||
const { data: domainName } = useResolveIotaNSName(sender); | ||
|
||
return ( | ||
<div className="grid grid-cols-1 gap-sm md:grid-cols-4"> | ||
{sender && ( | ||
<DisplayStats | ||
label="Sender" | ||
value={sender} | ||
valueLink={domainName ?? `/address/${sender}`} | ||
isTruncated | ||
/> | ||
)} | ||
{checkpoint && ( | ||
<DisplayStats | ||
label="Checkpoint" | ||
value={Number(checkpoint).toLocaleString()} | ||
valueLink={`/checkpoint/${checkpoint}`} | ||
/> | ||
)} | ||
{executedEpoch && ( | ||
<DisplayStats | ||
label="Epoch" | ||
value={executedEpoch} | ||
valueLink={`/epoch/${executedEpoch}`} | ||
/> | ||
)} | ||
|
||
{timestamp && <DisplayStats label="Date" value={formatDate(Number(timestamp))} />} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters