-
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
Redesign reports #2461
Redesign reports #2461
Conversation
PR deployed in Google Cloud |
PR deployed in Google Cloud |
90bc09f
to
4afb124
Compare
5f57f06
to
49a8307
Compare
eff41c1
to
472f289
Compare
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.
import { formatPoolFeeTransactionType } from './utils' | ||
|
||
type ReportFilterProps = { | ||
pool: Pool |
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.
I would recommend passing just the poolId as a prop and fetch the pool based on the id
@@ -49,6 +49,9 @@ export type ReportContextType = { | |||
|
|||
loan: string | |||
setLoan: (type: string) => void | |||
|
|||
reportData: any |
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.
can we do better than any
?
const transformDataChart = React.useMemo(() => { | ||
if (!reportData.length) return | ||
if (report === 'balance-sheet') { | ||
return reportData.map((data: any) => ({ |
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.
more any
😬 if reportData is typed you don't have to cast data
yAxis: new CurrencyBalance(data.netAssetValue, pool.currency.decimals).toNumber(), | ||
})) | ||
} else if (report === 'profit-and-loss') { | ||
return reportData.map((data: any) => { |
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.
😬
472f289
to
3b1e1f7
Compare
- Formatting now accepts and converts negative numbers - Icon changes color accordingly - Graph is rendering bars accordingly
3b1e1f7
to
370c4e1
Compare
* Redesign data tab * Fix types * Bug fixes
#2459
Approvals