Skip to content
Snippets Groups Projects
Unverified Commit 9aeab0ff authored by Mohamed El Mahdali's avatar Mohamed El Mahdali Committed by GitHub
Browse files

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

parent 36c700d9
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ import { ...@@ -12,6 +12,7 @@ import {
ResponsiveContainer, ResponsiveContainer,
} from 'recharts'; } from 'recharts';
import { usePrivacyMode } from '../../../hooks/usePrivacyMode';
import { theme } from '../../../style'; import { theme } from '../../../style';
import { type CSSProperties } from '../../../style'; import { type CSSProperties } from '../../../style';
import { AlignedText } from '../../common/AlignedText'; import { AlignedText } from '../../common/AlignedText';
...@@ -29,8 +30,10 @@ export function NetWorthGraph({ ...@@ -29,8 +30,10 @@ export function NetWorthGraph({
graphData, graphData,
compact, compact,
}: NetWorthGraphProps) { }: NetWorthGraphProps) {
const privacyMode = usePrivacyMode();
const tickFormatter = tick => { 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 = () => { const gradientOffset = () => {
......
---
category: Bugfix
authors: [ttlgeek]
---
Hide Y axis values of net worth graph when privacy mode is enabled.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment