From 9fc1e855ff4085ab7faac71e6a19d1748e494cf9 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Thu, 29 Sep 2022 13:53:43 -0500 Subject: [PATCH] portfolio graph: put profit first --- .../portfolio/portfolio-value-section.tsx | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/web/components/portfolio/portfolio-value-section.tsx b/web/components/portfolio/portfolio-value-section.tsx index ec364c8d..688dbf10 100644 --- a/web/components/portfolio/portfolio-value-section.tsx +++ b/web/components/portfolio/portfolio-value-section.tsx @@ -15,7 +15,7 @@ export const PortfolioValueSection = memo( const [portfolioPeriod, setPortfolioPeriod] = useState('weekly') const portfolioHistory = usePortfolioHistory(userId, portfolioPeriod) - const [graphMode, setGraphMode] = useState<'profit' | 'value'>('value') + const [graphMode, setGraphMode] = useState<'profit' | 'value'>('profit') const [graphDisplayNumber, setGraphDisplayNumber] = useState< number | string | null >(null) @@ -40,24 +40,6 @@ export const PortfolioValueSection = memo( <> - setGraphMode('value')} - > -
- Portfolio value -
-
- {graphMode === 'value' - ? graphDisplayNumber - ? graphDisplayNumber - : formatMoney(totalValue) - : formatMoney(totalValue)} -
- + + setGraphMode('value')} + > +
+ Portfolio value +
+
+ {graphMode === 'value' + ? graphDisplayNumber + ? graphDisplayNumber + : formatMoney(totalValue) + : formatMoney(totalValue)} +
+