Skip to content

Commit

Permalink
Update the logic for showing transaction status
Browse files Browse the repository at this point in the history
  • Loading branch information
kkosiorowska committed Jan 22, 2024
1 parent 2b987f3 commit 6693839
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ import { TextProps } from "@chakra-ui/react"
import SimpleText from "./SimpleText"

type StatusProps = {
status: TransactionInfoStatus
status?: TransactionInfoStatus
} & TextProps

function Status({ status, ...textProps }: StatusProps) {
if (status === "syncing")
return <StatusInfo status={status} withDefaultColor {...textProps} />

if (status === "pending")
return (
<SimpleText color="grey.400" {...textProps}>
In queue
</SimpleText>
)
if (status === "completed")
return <StatusInfo status={status} {...textProps} />

return <StatusInfo status={status} {...textProps} />
return (
<SimpleText color="grey.400" {...textProps}>
In queue
</SimpleText>
)
}

export default Status

0 comments on commit 6693839

Please sign in to comment.