From 08929732ab10eedd24bab69ff722d06b2bcda416 Mon Sep 17 00:00:00 2001 From: Matt Upham <30577966+mattupham@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:04:24 -0700 Subject: [PATCH] Set 1d, update loading skeleton --- .../web/components/chart/historical-chart.tsx | 4 +- .../complex/portfolio/assets-overview.tsx | 7 ++- .../complex/portfolio/historical-chart.tsx | 58 +++++++++---------- 3 files changed, 35 insertions(+), 34 deletions(-) diff --git a/packages/web/components/chart/historical-chart.tsx b/packages/web/components/chart/historical-chart.tsx index 5da1cbcf5b..e6fff6fac2 100644 --- a/packages/web/components/chart/historical-chart.tsx +++ b/packages/web/components/chart/historical-chart.tsx @@ -179,8 +179,8 @@ export const HistoricalChartHeader: FunctionComponent<{ export const HistoricalChartSkeleton = ({ hideScales = false }) => { return ( -
-
+
+
("1mo"); + const [range, setRange] = useState("1d"); const { data: portfolioOverTimeData, @@ -124,7 +124,8 @@ export const AssetsOverview: FunctionComponent< new PricePretty(DEFAULT_VS_CURRENCY, new Dec(dataPoint.value || 0)) || totalValue?.toString(); - const [isChartMinimized, setIsChartMinimized] = useState(true); + // const [isChartMinimized, setIsChartMinimized] = useState(true); + const [isChartMinimized, setIsChartMinimized] = useState(false); if (isWalletLoading) return null; diff --git a/packages/web/components/complex/portfolio/historical-chart.tsx b/packages/web/components/complex/portfolio/historical-chart.tsx index 721fc19a59..aaa573f709 100644 --- a/packages/web/components/complex/portfolio/historical-chart.tsx +++ b/packages/web/components/complex/portfolio/historical-chart.tsx @@ -40,15 +40,15 @@ export const PortfolioHistoricalChart = ({ const { logEvent } = useAmplitudeAnalytics(); return ( -
-
- {error ? ( -
- {t("errors.generic")} -
- ) : !isFetched ? ( - - ) : ( +
+ {error ? ( +
+ {t("errors.generic")} +
+ ) : !isFetched ? ( + + ) : ( + <> []} onPointerHover={(value, time) => { @@ -58,27 +58,27 @@ export const PortfolioHistoricalChart = ({ }} onPointerOut={resetDataPoint} /> - )} -
-
- - + + + } + onClick={() => setIsChartMinimized(true)} /> - } - onClick={() => setIsChartMinimized(true)} - /> -
+
+ + )} ); };