From c3b465725aa643e41a098bedb07e2c5d5d2a998d Mon Sep 17 00:00:00 2001 From: fmtabbara Date: Thu, 19 Dec 2024 11:42:59 +0000 Subject: [PATCH] rename id param to address --- explorer-nextjs/src/app/account/[id]/page.tsx | 80 ------------------- 1 file changed, 80 deletions(-) delete mode 100644 explorer-nextjs/src/app/account/[id]/page.tsx diff --git a/explorer-nextjs/src/app/account/[id]/page.tsx b/explorer-nextjs/src/app/account/[id]/page.tsx deleted file mode 100644 index b641e82438..0000000000 --- a/explorer-nextjs/src/app/account/[id]/page.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import type { CurrencyRates, IAccountBalancesInfo } from "@/app/api/types"; -import { NYM_ACCOUNT_ADDRESS, NYM_PRICES_API } from "@/app/api/urls"; -import { AccountBalancesCard } from "@/components/accountPageComponents/AccountBalancesCard"; -import { AccountInfoCard } from "@/components/accountPageComponents/AccountInfoCard"; -import { ContentLayout } from "@/components/contentLayout/ContentLayout"; -import SectionHeading from "@/components/headings/SectionHeading"; -import ExplorerButtonGroup from "@/components/toggleButton/ToggleButton"; -import { Box, Grid2 } from "@mui/material"; - -export default async function Account({ - params, -}: { - params: Promise<{ address: string }>; -}) { - // const address = (await params).address; - console.log("(await params).address :>> ", (await params).address); - const address = "n1z0msxu8c098umdhnthpr2ac3ck2n3an97dm8pn"; - - const nymAccountAddress = `${NYM_ACCOUNT_ADDRESS}${address}`; - const accountData = await fetch(nymAccountAddress, { - headers: { - Accept: "application/json", - "Content-Type": "application/json; charset=utf-8", - }, - next: { revalidate: 60 }, - // refresh event list cache at given interval - }); - const nymAccountBalancesData: IAccountBalancesInfo = await accountData.json(); - - if (!nymAccountBalancesData) { - return null; - } - console.log("nymAccountBalancesData :>> ", nymAccountBalancesData); - const nymPrice = await fetch(NYM_PRICES_API, { - headers: { - Accept: "application/json", - "Content-Type": "application/json; charset=utf-8", - }, - next: { revalidate: 60 }, - // refresh event list cache at given interval - }); - - const nymPriceData: CurrencyRates = await nymPrice.json(); - - console.log("nymPriceData :>> ", nymPriceData); - - console.log("nymAccountData :>> ", nymAccountBalancesData); - return ( - - - - - - - - - - - - - - - - - - - ); -}