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

✨ Show trust score and stake rate instead of pending and unconfirmed #148

Merged
merged 2 commits into from
Apr 2, 2022

Conversation

rayanfer32
Copy link
Owner

@rayanfer32 rayanfer32 commented Apr 1, 2022

Description

Type of change

  • New feature (non-breaking change which adds functionality)
  • Refactor/Revamp ( rewrite or restructure code)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Area of change

  • Frontend
  • Backend

Checklist:

  • My code follows the style guidelines of this project
  • I ran npm run format/yarn format before commit
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation where needed
  • My changes generate no new warnings
  • I have checked my code and corrected any misspellings
  • I have updated develop and merged to my branch before submitting pull request
  • My pull request generate no conflicts with develop or main branch
  • I requested code review from other team members

Related Issue

  • none

Proposed Changes

  • none

Additional Info

  • none

Screenshots

Original Updated

@vercel
Copy link

vercel bot commented Apr 1, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/rayanfer32/nexus-explorer-next/H29bfpq37i29WkFdf5KV9o5wPhC9
✅ Preview: https://nexus-explorer-next-git-feature-update-trust-info-rayanfer32.vercel.app

@rayanfer32 rayanfer32 requested a review from shrivatsabhat April 1, 2022 16:16
Copy link
Collaborator

@shrivatsabhat shrivatsabhat left a comment

Choose a reason for hiding this comment

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

Good enough, try to solve comment

Comment on lines +27 to +60
{isTrust ? (
<SmallCard
label="Stake Rate"
sublabel=""
value={data.rate || 0}
unit="%"
icon={<HiChartBar />}
/>
) : (
<SmallCard
label="Pending"
sublabel=""
value={new Intl.NumberFormat().format(data?.pending || 0)}
unit="NXS"
icon={<BsFillClockFill />}
/>
)}
{isTrust ? (
<SmallCard
label="Trust Score"
sublabel=""
value={data?.trust || 0}
unit="+"
icon={<FaHandshake />}
/>
) : (
<SmallCard
label="Unconfirmed"
sublabel=""
value={data?.unconfirmed || 0}
unit="NXS"
icon={<FaUserClock />}
/>
)}
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we add a single condition rather duplicating

Copy link
Owner Author

Choose a reason for hiding this comment

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

can we add a single condition rather duplicating

But how ?

@rayanfer32 rayanfer32 merged commit a63c944 into develop Apr 2, 2022
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