From b635a1949b81b996d4b2a55281de93fd26cb7b16 Mon Sep 17 00:00:00 2001 From: SeonghyeonKim Date: Fri, 25 Oct 2024 22:28:14 +0900 Subject: [PATCH] feat: add button Add 'Go to Stake' button to route stake page. --- pages/[network]/agent/[address].tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pages/[network]/agent/[address].tsx b/pages/[network]/agent/[address].tsx index 46e04fc..c4d7d6d 100644 --- a/pages/[network]/agent/[address].tsx +++ b/pages/[network]/agent/[address].tsx @@ -3,6 +3,7 @@ import { getHeadlessGraphQLSDK } from "../../../utils/headlessGraphQLClient"; interface Agent { avatars: Avatar[]; + address: string; } interface Avatar { @@ -13,6 +14,7 @@ interface Avatar { } interface AgentPageProps { + network: string; agent: Agent | null } @@ -41,7 +43,7 @@ function Avatar(avatar: Avatar) { ); } -const AgentPage: NextPage = ({ agent }) => { +const AgentPage: NextPage = ({ agent, network }) => { if (agent === null) { return (

There is no such agent.

@@ -58,6 +60,7 @@ const AgentPage: NextPage = ({ agent }) => { return (
{agent.avatars.map(avatar => )} +
) } @@ -79,6 +82,7 @@ export const getServerSideProps: GetServerSideProps = async (con return { props: { agent: null, + network: network, } } } @@ -87,7 +91,9 @@ export const getServerSideProps: GetServerSideProps = async (con props: { agent: { avatars: agentJsonObj.avatarStates as Avatar[], + address: address, }, + network: network, } } }