yearn / yPartners

Partners website
https://partners.yearn.farm
GNU General Public License v3.0
6 stars 5 forks source link

fix: Resolve dashboard crash + UI fixes #151

Closed 0xMirim closed 1 year ago

0xMirim commented 1 year ago

Description

This PR resolves an error that caused a small subset of dashboards to crash during data visualization. The issue itself was related to how I was back-filling missing data (which is require to avoid other visual issues).

Basically the calculation for how many days of empty data needed to be back-filled could in some cases result in a decimal (ex: 28.1234) number causing an extra incorrect day to be added to the back-filled data, leading to out of range errors during visualization.

This error is resolve by using Math.floor in DashboardTabsWrapper.tsx, on lines 194 and 271

Extra:

Extra from Itzabelli (I reviewed / approved):

Related Issue

N/A

Motivation and Context

Resolve dashboard crash

How Has This Been Tested?

I manually entered all dashboards to verify the overview tabs loaded properly

Resources

Following is for the improvements to the no data UI on sacked charts

Before:

before

After:

after
vercel[bot] commented 1 year ago

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

Name Status Preview Comments Updated
ypartners ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 21, 2023 at 7:09AM (UTC)