From e1d203c69bd21493eae1de95ee58b42cec37ae9f Mon Sep 17 00:00:00 2001 From: Zishan Date: Thu, 14 Dec 2023 03:16:21 +0530 Subject: [PATCH] feat(milestone-list): complete app --- src/pages/proposal.tsx | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/pages/proposal.tsx b/src/pages/proposal.tsx index e85996e..0d300bb 100644 --- a/src/pages/proposal.tsx +++ b/src/pages/proposal.tsx @@ -38,6 +38,7 @@ const ProposalPage = () => { const { isSignedIn } = useAuth(); const { stxAddress } = useAccount(); const [proposalInfo, setProposalInfo] = React.useState(); + const [milestoneInfo, setMilestoneInfo] = React.useState(); const { openContractCall } = useOpenContractCall(); @@ -138,6 +139,7 @@ const ProposalPage = () => { }); console.log(cvToValue(result)); + setMilestoneInfo(cvToValue(result)); } catch (error) { console.error('Failed to fetch balance:', error); } @@ -240,6 +242,29 @@ const ProposalPage = () => { + + {milestoneInfo && ( +
+

+ Milestones ({milestoneInfo.length}) +

+
+ {milestoneInfo.map((milestone: any) => ( +
+
+
+ milestone ID : {milestone.value.id.value} +
+
+ Amount : {milestone.value.amount.value / 1000000}{' '} + STX +
+
+
+ ))} +
+
+ )}