Skip to content

Commit

Permalink
refactor: improve displayed text
Browse files Browse the repository at this point in the history
  • Loading branch information
doitian committed Dec 30, 2023
1 parent ea80140 commit 853afdb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
16 changes: 9 additions & 7 deletions src/app/accounts/[address]/account-header.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
export default function AccountHeader({ address }) {
export default function AccountHeader({ address, config: { ckbChain } }) {
return (
<header>
<p className="break-all">{address}</p>
<p>
Claim CKB From{" "}
<a target="_blank" href="https://faucet.nervos.org/">
Faucet
</a>
</p>
{ckbChain === "AGGRON4" ? (
<p>
Claim CKB From{" "}
<a target="_blank" href="https://faucet.nervos.org/">
Faucet
</a>
</p>
) : null}
</header>
);
}
7 changes: 5 additions & 2 deletions src/app/accounts/[address]/page.js
Original file line number Diff line number Diff line change
@@ -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 (
<>
<header>
<AccountHeader address={address} />
<AccountHeader address={address} config={config} />
</header>
<main>
<Suspense fallback={<AssetsFallback />}>
Expand Down
3 changes: 2 additions & 1 deletion src/app/accounts/[address]/submit-building-packet.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export function TxStatus({ txHash, txStatus, ckbChainConfig }) {
<>
{txHash ? (
<p className="break-all">
Tx Hash: <TxHash txHash={txHash} ckbChainConfig={ckbChainConfig} />
Transactoin Hash:{" "}
<TxHash txHash={txHash} ckbChainConfig={ckbChainConfig} />
</p>
) : null}
{txStatus.status === "committed"
Expand Down

0 comments on commit 853afdb

Please sign in to comment.