-
Notifications
You must be signed in to change notification settings - Fork 29
tBTC user stats on the overview page #492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pass `as` prop if the icon is not defined in the `Icon` enum which maps enum to an icon component. Otherwise we can't use custom icons in eg. `TokenBalance` component. We need to revist this component and consider removing it.
The word `tBTC` should always start with a lowercase letter - so here we add a component that forces `t` to be lowercase, even if we use it inside a component that transforms text to uppercase, e.g. `Label` component from Threshold typography components.
We want to use the same bridge activity components on the overview page. Here we move the `BridgeActivity` component to shared components and add a context so we can keep the same logic(like displaying empty states) in different places of the dapp.
Display user's tBTC balance and their latest 2 bridge activities. Also user can navigate to a tBTC page from this card.
|
Preview uploaded to https://preview.dashboard.test.threshold.network/tbtc-my-stats/index.html. |
Add new upgrade T tokens card and update the layout according to the Figma views.
|
Preview uploaded to https://preview.dashboard.test.threshold.network/tbtc-my-stats/index.html. |
michalsmiarowski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments to look at before the merge
| <Box as="span">-.--</Box> | ||
| <Box as="span">-.--</Box> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the -.-- should have color gray.700.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <Box as="span">-.--</Box> | ||
| <Box as="span">-.--</Box> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <BodyMd mb="6">My Activity</BodyMd> | ||
| <BridgeActivity | ||
| data={_bridgeActivity} | ||
| isFetching={isBridgeActivityFetching} | ||
| > | ||
| <BridgeActivityData /> | ||
| </BridgeActivity> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <ButtonLink size="lg" isFullWidth mt={4} to="/tBTC"> | ||
| New Mint | ||
| </ButtonLink> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the designs we have Connect your wallet when user is not connected. Not sure if it's really needed though because we have to redirect him to the minting page where he has to connect the wallet anyway to do something soo just pointing that out.
The bridge activity items are too wide in comparison with `My Balance` section.
Render custom empty state for bridge activity component.
Set correct text color according to the Figma views.
|
Preview uploaded to https://preview.dashboard.test.threshold.network/tbtc-my-stats/index.html. |
1 similar comment
|
Preview uploaded to https://preview.dashboard.test.threshold.network/tbtc-my-stats/index.html. |
michalsmiarowski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🥍




Depends on: #490
This PR adds the tBTC user stats on the overview page. In this card, we display user's tBTC balance and their latest 2 bridge activities. Also users can navigate to a tBTC page from this card. Here we also update the layout of the overview page.
Main changes:
BridgeActivitycomponent- move theBridgeActivitycomponent to shared components and add a context so we can keep the same logic(like displaying empty states) in different places of the dapp (eg. overview page and tBTC page).Screenshots