mirror of
https://github.com/luxfhe/example-rps-game.git
synced 2026-11-03 05:50:18 +00:00
30 lines
798 B
TypeScript
30 lines
798 B
TypeScript
import TransactionComp from "../_components/TransactionComp";
|
|
import { NextPage } from "next";
|
|
import { Hash } from "viem";
|
|
import { ZERO_ADDRESS, isZeroAddress } from "~~/utils/scaffold-eth/common";
|
|
import { getMetadata } from "~~/utils/scaffold-eth/getMetadata";
|
|
|
|
type PageProps = {
|
|
params: Promise<{ txHash?: Hash }>;
|
|
};
|
|
|
|
export const metadata = getMetadata({
|
|
title: "Transaction Detail",
|
|
description: "Transaction Detail",
|
|
});
|
|
|
|
export function generateStaticParams() {
|
|
return [{ txHash: ZERO_ADDRESS }];
|
|
}
|
|
|
|
const TransactionPage: NextPage<PageProps> = async (props: PageProps) => {
|
|
const params = await props.params;
|
|
const txHash = params?.txHash as Hash;
|
|
|
|
if (isZeroAddress(txHash)) return null;
|
|
|
|
return <TransactionComp txHash={txHash} />;
|
|
};
|
|
|
|
export default TransactionPage;
|