mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-09 14:58:47 +00:00
Enhancement: support another ghostfolio breaking API change (#3987)
This commit is contained in:
parent
295c6ea796
commit
1eb6ac6d90
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue