From 853afdb802fc8ebe925b733c6f02c7cbb776982e Mon Sep 17 00:00:00 2001 From: ian Date: Sat, 30 Dec 2023 08:38:52 +0800 Subject: [PATCH] refactor: improve displayed text --- src/app/accounts/[address]/account-header.js | 16 +++++++++------- src/app/accounts/[address]/page.js | 7 +++++-- .../accounts/[address]/submit-building-packet.js | 3 ++- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/app/accounts/[address]/account-header.js b/src/app/accounts/[address]/account-header.js index 56e333b..81c1d86 100644 --- a/src/app/accounts/[address]/account-header.js +++ b/src/app/accounts/[address]/account-header.js @@ -1,13 +1,15 @@ -export default function AccountHeader({ address }) { +export default function AccountHeader({ address, config: { ckbChain } }) { return (

{address}

-

- Claim CKB From{" "} - - Faucet - -

+ {ckbChain === "AGGRON4" ? ( +

+ Claim CKB From{" "} + + Faucet + +

+ ) : null}
); } diff --git a/src/app/accounts/[address]/page.js b/src/app/accounts/[address]/page.js index 90f2293..59ae182 100644 --- a/src/app/accounts/[address]/page.js +++ b/src/app/accounts/[address]/page.js @@ -1,12 +1,15 @@ import { Suspense } from "react"; +import { useConfig } from "@/lib/config"; import Assets, { AssetsFallback } from "./assets"; import AccountHeader from "./account-header"; -export default function Account({ params: { address } }) { +export default function Account({ params: { address }, config }) { + config = config ?? useConfig(); + return ( <>
- +
}> diff --git a/src/app/accounts/[address]/submit-building-packet.js b/src/app/accounts/[address]/submit-building-packet.js index feacbb3..e3ad1e1 100644 --- a/src/app/accounts/[address]/submit-building-packet.js +++ b/src/app/accounts/[address]/submit-building-packet.js @@ -38,7 +38,8 @@ export function TxStatus({ txHash, txStatus, ckbChainConfig }) { <> {txHash ? (

- Tx Hash: + Transactoin Hash:{" "} +

) : null} {txStatus.status === "committed"