Skip to content
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

feat: earn tab texts #2344

Merged
merged 1 commit into from
Feb 3, 2025
Merged

feat: earn tab texts #2344

merged 1 commit into from
Feb 3, 2025

Conversation

dianasavvatina
Copy link
Contributor

Proposed changes

Earn tab text depends on account state:

  • not delegated --> Start earning
  • delegated but full balance is spendable -> Stake
  • delegated and part of balance is spendable -> Manage funds

Design: Notion
UMA-1114

Types of changes

  • Bugfix
  • New feature
  • Refactor
  • Breaking change
  • UI fix

Steps to reproduce

See Earn tab.

Screenshots

Add the screenshots of how the app used to look like and how it looks now

Before:
image

Scenario Now
Not delegated image
Delegated, not staked image
Staked image

Checklist

  • Tests that prove my fix is effective or that my feature works have been added
  • Documentation has been added (if appropriate)
  • Screenshots are added (if any UI changes have been made)
  • All TODOs have a corresponding task created (and the link is attached to it)

Copy link

vercel bot commented Jan 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
umami-embed-iframe ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 3, 2025 5:09pm
umami-embed-iframe-ghostnet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 3, 2025 5:09pm
umami-v2-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 3, 2025 5:09pm
umami-v2-web-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 3, 2025 5:09pm

subtitle={"Maximize your tez with staking.com.\nSecure, efficient, and simple."}
title="Boost your rewards"
/>
delegate === null || delegate === undefined ? (
Copy link
Contributor

@OKendigelyan OKendigelyan Feb 3, 2025

Choose a reason for hiding this comment

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

Try not to use nested ternary operators, instead it is better to use if/else inside getCtaMessage which will return the appropriate jsx

Copy link
Contributor

@OKendigelyan OKendigelyan left a comment

Choose a reason for hiding this comment

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

Approve with small comment

return <VerifyMessage />;
}

if (delegate === null || delegate === undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (delegate === null || delegate === undefined) {
!delegate {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants