Hide Y axis values of net worth graph when privacy mode i… (#2594)

This commit is contained in:
Mohamed El Mahdali
2024-04-13 11:50:35 +00:00
committed by GitHub
parent 36c700d92d
commit 9aeab0ff5b
2 changed files with 10 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ import {
ResponsiveContainer,
} from 'recharts';
import { usePrivacyMode } from '../../../hooks/usePrivacyMode';
import { theme } from '../../../style';
import { type CSSProperties } from '../../../style';
import { AlignedText } from '../../common/AlignedText';
@@ -29,8 +30,10 @@ export function NetWorthGraph({
graphData,
compact,
}: NetWorthGraphProps) {
const privacyMode = usePrivacyMode();
const tickFormatter = tick => {
return `${Math.round(tick).toLocaleString()}`; // Formats the tick values as strings with commas
return privacyMode ? '...' : `${Math.round(tick).toLocaleString()}`; // Formats the tick values as strings with commas
};
const gradientOffset = () => {

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [ttlgeek]
---
Hide Y axis values of net worth graph when privacy mode is enabled.