-
Notifications
You must be signed in to change notification settings - Fork 16
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
Use react-query for data fetches #336
Conversation
🚀 Deployed on https://pr-336--dev-tinlake.netlify.app |
@@ -27,7 +28,7 @@ const PoolsMetrics: React.FC<Props> = (props: Props) => { | |||
|
|||
const maxPoolValue = Math.max.apply( | |||
Math, | |||
poolsDailyData.map((o) => { | |||
dailyTVL.map((o) => { |
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.
we needa change these one letter variable names soon 🙈
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.
🙈
@@ -30,15 +32,53 @@ interface Props { | |||
|
|||
export type Card = 'home' | 'collect' | 'order' | 'invest' | 'redeem' | |||
|
|||
function useTrancheData(tinlake: ITinlake, tranche: 'senior' | 'junior', address?: string | null) { |
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.
maybe we move this to the hooks
folder?
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.
Yeah, probably. Or we can combine it with the epoch data hook and make it one multicall to avoid having a bunch of requests.
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.
😱 😱 😱 🔥
Removes most ducks that were used for data fetching and replace with hook that use react-query to fetch the data. The
loans
anduserRewards
ducks are still todo, but will leave those for a later time.Closes #344