From af0df3e8b643e1c9319f33bde87beae480f8d184 Mon Sep 17 00:00:00 2001 From: AshenI99 Date: Wed, 23 Mar 2022 21:27:55 +0530 Subject: [PATCH] fix(components): update History component --- packages/components/src/History.tsx | 16 ++++------ .../src/stories/History.stories.tsx | 32 +++++++------------ 2 files changed, 19 insertions(+), 29 deletions(-) diff --git a/packages/components/src/History.tsx b/packages/components/src/History.tsx index 6aac7787..f8992882 100644 --- a/packages/components/src/History.tsx +++ b/packages/components/src/History.tsx @@ -5,11 +5,9 @@ import moment from "moment"; type historyProps = { type: string timestamp: string - mintBy?: { id : string | null } | null - burnBy?: { id : string | null } | null - bidBy?: { id : string | null } | null - transferFrom?: { id : string | null } | null - transferTo?: { id : string | null } | null + amount: number | null + sender?: { id : string | null } | null + recipient?: { id : string | null } | null transactionHash: string } @@ -124,10 +122,10 @@ export function History ({ history = [] } : { transactionHash={ historyItem.transactionHash } > <> - {historyItem.type == "burn" && } - {historyItem.type == "mint" && } - {historyItem.type == "bid" && } - {historyItem.type == "transfer" && } + {historyItem.type == "burn" && } + {historyItem.type == "mint" && } + {historyItem.type == "set_bid" && } + {historyItem.type == "transfer" && } ) diff --git a/packages/components/src/stories/History.stories.tsx b/packages/components/src/stories/History.stories.tsx index 3ccff253..9b841518 100644 --- a/packages/components/src/stories/History.stories.tsx +++ b/packages/components/src/stories/History.stories.tsx @@ -22,38 +22,30 @@ Tre.args = { { type: "mint", timestamp: "1641199188285678087", - mintBy: { id: "demo.testnet" }, - burnBy: null, - bidBy: null, - transferFrom: null, - transferTo: null, + sender: { id: "demo.testnet" }, + amount: null, + recipient: null, transactionHash: "aayyx44578ggnkk98989787fbjby8" }, { type: "bid", timestamp: "1649199188285678087", - mintBy: null, - burnBy: null, - bidBy: { id: "demo.testnet" }, - transferFrom: null, - transferTo: null, + sender: { id: "demo.testnet" }, + amount: null, + recipient: null, transactionHash: "aayyx44578FFFbb5654fbjby8" }, { type: "burn", timestamp: "1642599168285678017", - mintBy: null, - burnBy: { id: "demo.testnet" }, - bidBy: null, - transferFrom: null, - transferTo: null, + sender: { id: "demo.testnet" }, + amount: null, + recipient: null, transactionHash: "aayyx44578gg4666h583vvnkk98989787fbjby8" }, { type: "transfer", timestamp: "1642199908285679017", - mintBy: null, - burnBy: null, - bidBy: null, - transferFrom: { id: "demo.testnet" }, - transferTo: {id : "demo2.testnet" }, + sender: { id: "demo.testnet" }, + recipient: {id : "demo2.testnet" }, + amount: null, transactionHash: "aadddJhjdB7889HUu?78dvfn89787fbjby8" } ]