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

Fix bug on holdings page #2473

Draft
wants to merge 1 commit into
base: add_data_page_redesign
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
const [filter, setFilter] = React.useState<FilterOptions>('30days')
const [index, setIndex] = React.useState(0)

if (!poolId) return

const dateFrom = React.useMemo(() => {

Check failure on line 31 in centrifuge-app/src/components/InvestRedeem/InvestRedeemDrawer.tsx

View workflow job for this annotation

GitHub Actions / build-app

React Hook "React.useMemo" is called conditionally. React Hooks must be called in the exact same order in every component render

Check failure on line 31 in centrifuge-app/src/components/InvestRedeem/InvestRedeemDrawer.tsx

View workflow job for this annotation

GitHub Actions / ff-prod / build-app

React Hook "React.useMemo" is called conditionally. React Hooks must be called in the exact same order in every component render

Check failure on line 31 in centrifuge-app/src/components/InvestRedeem/InvestRedeemDrawer.tsx

View workflow job for this annotation

GitHub Actions / app-pr-deploy / build-app

React Hook "React.useMemo" is called conditionally. React Hooks must be called in the exact same order in every component render
if (filter === 'YTD') {
const currentYear = new Date().getFullYear()
const januaryFirst = new Date(currentYear, 0, 1)
Expand All @@ -49,7 +51,7 @@
return today
}, [filter])

const { poolStates: dailyPoolStates } = useDailyPoolStates(poolId, new Date(dateFrom)) || {}

Check failure on line 54 in centrifuge-app/src/components/InvestRedeem/InvestRedeemDrawer.tsx

View workflow job for this annotation

GitHub Actions / build-app

React Hook "useDailyPoolStates" is called conditionally. React Hooks must be called in the exact same order in every component render

Check failure on line 54 in centrifuge-app/src/components/InvestRedeem/InvestRedeemDrawer.tsx

View workflow job for this annotation

GitHub Actions / ff-prod / build-app

React Hook "useDailyPoolStates" is called conditionally. React Hooks must be called in the exact same order in every component render

Check failure on line 54 in centrifuge-app/src/components/InvestRedeem/InvestRedeemDrawer.tsx

View workflow job for this annotation

GitHub Actions / app-pr-deploy / build-app

React Hook "useDailyPoolStates" is called conditionally. React Hooks must be called in the exact same order in every component render

return (
<Drawer isOpen={open} onClose={onClose}>
Expand Down Expand Up @@ -132,7 +134,7 @@
})
}
return tokenData
}, [dailyPoolStates, pool?.tranches, trancheId, filter])

Check warning on line 137 in centrifuge-app/src/components/InvestRedeem/InvestRedeemDrawer.tsx

View workflow job for this annotation

GitHub Actions / build-app

React Hook React.useMemo has a missing dependency: 'apy'. Either include it or remove the dependency array

Check warning on line 137 in centrifuge-app/src/components/InvestRedeem/InvestRedeemDrawer.tsx

View workflow job for this annotation

GitHub Actions / ff-prod / build-app

React Hook React.useMemo has a missing dependency: 'apy'. Either include it or remove the dependency array

Check warning on line 137 in centrifuge-app/src/components/InvestRedeem/InvestRedeemDrawer.tsx

View workflow job for this annotation

GitHub Actions / app-pr-deploy / build-app

React Hook React.useMemo has a missing dependency: 'apy'. Either include it or remove the dependency array

if (!data.length) return

Expand Down
Loading