Skip to content

Commit

Permalink
fix(components): update History component
Browse files Browse the repository at this point in the history
  • Loading branch information
AshenI99 authored and AshenI99 committed Feb 17, 2022
1 parent e127bf7 commit 3367597
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions packages/components/src/History.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import moment from "moment";
type historyProps = {
type: string
timestamp: string
mintBy?: string | null
burnBy?: string | null
bidBy?: string | null
transferFrom?: string | null
transferTo?: string | null
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
transactionHash: string
}

Expand Down Expand Up @@ -124,10 +124,10 @@ export function History ({ history = [] } : {
transactionHash={ historyItem.transactionHash }
>
<>
{historyItem.type == "burn" && <Burn accountId = {historyItem.burnBy! }/> }
{historyItem.type == "mint" && <Mint accountId = {historyItem.mintBy! }/> }
{historyItem.type == "bid" && <Bid accountId = {historyItem.bidBy! }/> }
{historyItem.type == "transfer" && <Transfer accountId = {historyItem.transferFrom! } receiverId={ historyItem.transferTo! } /> }
{historyItem.type == "burn" && <Burn accountId = {historyItem.burnBy!.id! }/> }
{historyItem.type == "mint" && <Mint accountId = {historyItem.mintBy!.id! }/> }
{historyItem.type == "bid" && <Bid accountId = {historyItem.bidBy!.id! }/> }
{historyItem.type == "transfer" && <Transfer accountId = {historyItem.transferFrom!.id! } receiverId={ historyItem.transferTo!.id! } /> }
</>
</HistoryItemLayout>
)
Expand Down
10 changes: 5 additions & 5 deletions packages/components/src/stories/History.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Tre.args = {
{
type: "mint",
timestamp: "1641199188285678087",
mintBy: "demo.testnet",
mintBy: { id: "demo.testnet" },
burnBy: null,
bidBy: null,
transferFrom: null,
Expand All @@ -33,15 +33,15 @@ Tre.args = {
timestamp: "1649199188285678087",
mintBy: null,
burnBy: null,
bidBy: "demo.testnet",
bidBy: { id: "demo.testnet" },
transferFrom: null,
transferTo: null,
transactionHash: "aayyx44578FFFbb5654fbjby8"
}, {
type: "burn",
timestamp: "1642599168285678017",
mintBy: null,
burnBy: "demo.testnet",
burnBy: { id: "demo.testnet" },
bidBy: null,
transferFrom: null,
transferTo: null,
Expand All @@ -52,8 +52,8 @@ Tre.args = {
mintBy: null,
burnBy: null,
bidBy: null,
transferFrom: "demo.testnet",
transferTo: "demo2.testnet",
transferFrom: { id: "demo.testnet" },
transferTo: {id : "demo2.testnet" },
transactionHash: "aadddJhjdB7889HUu?78dvfn89787fbjby8"
}
]
Expand Down

1 comment on commit 3367597

@vercel
Copy link

@vercel vercel bot commented on 3367597 Feb 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.