mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
Enhancement: support another ghostfolio breaking API change (#3987)
This commit is contained in:
parent
295c6ea796
commit
1eb6ac6d90
@ -6,7 +6,9 @@ import useWidgetAPI from "utils/proxy/use-widget-api";
|
||||
|
||||
function getPerformancePercent(t, performanceRange) {
|
||||
// ghostfolio v2.79.0 changed to grossPerformancePercentage
|
||||
// ghostfolio v2.106.0 changed to netPerformancePercentageWithCurrencyEffect
|
||||
const percent =
|
||||
performanceRange.performance.netPerformancePercentageWithCurrencyEffect ??
|
||||
performanceRange.performance.grossPerformancePercentage ??
|
||||
performanceRange.performance.currentGrossPerformancePercent;
|
||||
return `${percent > 0 ? "+" : ""}${t("common.percent", {
|
||||
|
Loading…
x
Reference in New Issue
Block a user