Fujicracy / fuji-v2

Cross-chain money market aggregator
https://fuji-v2-frontend.vercel.app
15 stars 10 forks source link

Markets store #525

Closed ferostabio closed 1 year ago

ferostabio commented 1 year ago

close #517

Created a markets.store, moved there all functions from MarketsTable. In order to avoid making a huge refactor I also moved the row creation code there, so the store has a rows convenience property to be used in the markets page (a lot of work would be needed otherwise in order to break things down more, including all of the components).

Anyway, took the chance to make some minor improvements to the helper and stores as well.

ferostabio commented 1 year ago

@brozorec there is one more thing to do here.

At the moment, when the user returns to the page, we re fetch the data (of course), and that means we re set the initial data and we show the loaders for the financials. Give it a try and see.

In order to avoid this, since we already have data, there's no need to show the first initial batch and we can go directly to the last one (unless error)