Skip to content

Commit

Permalink
Hide Y axis values of net worth graph when privacy mode i… (#2594)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttlgeek authored Apr 13, 2024
1 parent 36c700d commit 9aeab0f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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 = () => {
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/2594.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [ttlgeek]
---

Hide Y axis values of net worth graph when privacy mode is enabled.

0 comments on commit 9aeab0f

Please sign in to comment.