From acc2ea2b7a9537a9cb4a83b2bacf336a95f43e80 Mon Sep 17 00:00:00 2001 From: w84april Date: Mon, 6 Jul 2026 14:39:09 +0300 Subject: [PATCH 1/2] Update 30d APY chart to use 30d interval by default --- .../vaults/components/detail/VaultChartsSection.tsx | 4 +++- .../vaults/components/detail/YvUsdChartsSection.tsx | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/pages/vaults/components/detail/VaultChartsSection.tsx b/src/components/pages/vaults/components/detail/VaultChartsSection.tsx index d89a8a130..ba982fdad 100644 --- a/src/components/pages/vaults/components/detail/VaultChartsSection.tsx +++ b/src/components/pages/vaults/components/detail/VaultChartsSection.tsx @@ -42,6 +42,7 @@ export const VAULT_CHART_TIMEFRAME_OPTIONS = [ ] as const export type TVaultChartTimeframe = (typeof VAULT_CHART_TIMEFRAME_OPTIONS)[number]['value'] +export const DEFAULT_VAULT_CHART_TIMEFRAME: TVaultChartTimeframe = '30d' type TBaseVaultChartTab = 'historical-pps' | 'historical-apy' | 'historical-tvl' type TUserVaultChartTab = 'user-position' @@ -117,7 +118,8 @@ export function VaultChartsSection({ const transformed = useMemo(() => transformVaultChartData(data), [data]) const [uncontrolledTab, setUncontrolledTab] = useState('historical-apy') - const [uncontrolledTimeframe, setUncontrolledTimeframe] = useState('1y') + const [uncontrolledTimeframe, setUncontrolledTimeframe] = + useState(DEFAULT_VAULT_CHART_TIMEFRAME) const activeTab = chartTab ?? uncontrolledTab const activeTimeframe = timeframe ?? uncontrolledTimeframe diff --git a/src/components/pages/vaults/components/detail/YvUsdChartsSection.tsx b/src/components/pages/vaults/components/detail/YvUsdChartsSection.tsx index 75bedd7f8..c6d1b24af 100644 --- a/src/components/pages/vaults/components/detail/YvUsdChartsSection.tsx +++ b/src/components/pages/vaults/components/detail/YvUsdChartsSection.tsx @@ -9,7 +9,12 @@ import ChartSkeleton from './charts/ChartSkeleton' import ChartsLoader from './charts/ChartsLoader' import { FixedHeightChartContainer } from './charts/FixedHeightChartContainer' import { YvUsdApyChart, YvUsdChartLegend, YvUsdPerformanceChart, YvUsdTvlChart } from './charts/YvUsdDualLineChart' -import { VAULT_CHART_TABS, type VAULT_CHART_TIMEFRAME_OPTIONS, VaultChartTimeframeDropdown } from './VaultChartsSection' +import { + DEFAULT_VAULT_CHART_TIMEFRAME, + VAULT_CHART_TABS, + type VAULT_CHART_TIMEFRAME_OPTIONS, + VaultChartTimeframeDropdown +} from './VaultChartsSection' const VaultTvlGrowthChart = lazy(() => import('./charts/VaultTvlGrowthChart').then((m) => ({ default: m.VaultTvlGrowthChart })) @@ -87,7 +92,8 @@ export function YvUsdChartsSection({ const { apyData, performanceData, tvlData, isLoading, error } = useYvUsdCharts() const [uncontrolledTab, setUncontrolledTab] = useState('historical-apy') - const [uncontrolledTimeframe, setUncontrolledTimeframe] = useState('1y') + const [uncontrolledTimeframe, setUncontrolledTimeframe] = + useState(DEFAULT_VAULT_CHART_TIMEFRAME) const activeTab = chartTab ?? uncontrolledTab const activeTimeframe = timeframe ?? uncontrolledTimeframe From 07976366569fba2fb5624d3dab1cefe2c6500edb Mon Sep 17 00:00:00 2001 From: w84april Date: Wed, 15 Jul 2026 14:53:01 +0300 Subject: [PATCH 2/2] Make it 90D default for yvUSD only --- .../vaults/components/detail/VaultChartsSection.tsx | 2 +- .../vaults/components/detail/YvUsdChartsSection.tsx | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/pages/vaults/components/detail/VaultChartsSection.tsx b/src/components/pages/vaults/components/detail/VaultChartsSection.tsx index ba982fdad..60e6d4c84 100644 --- a/src/components/pages/vaults/components/detail/VaultChartsSection.tsx +++ b/src/components/pages/vaults/components/detail/VaultChartsSection.tsx @@ -42,7 +42,7 @@ export const VAULT_CHART_TIMEFRAME_OPTIONS = [ ] as const export type TVaultChartTimeframe = (typeof VAULT_CHART_TIMEFRAME_OPTIONS)[number]['value'] -export const DEFAULT_VAULT_CHART_TIMEFRAME: TVaultChartTimeframe = '30d' +const DEFAULT_VAULT_CHART_TIMEFRAME: TVaultChartTimeframe = '1y' type TBaseVaultChartTab = 'historical-pps' | 'historical-apy' | 'historical-tvl' type TUserVaultChartTab = 'user-position' diff --git a/src/components/pages/vaults/components/detail/YvUsdChartsSection.tsx b/src/components/pages/vaults/components/detail/YvUsdChartsSection.tsx index c6d1b24af..a79a59453 100644 --- a/src/components/pages/vaults/components/detail/YvUsdChartsSection.tsx +++ b/src/components/pages/vaults/components/detail/YvUsdChartsSection.tsx @@ -9,12 +9,7 @@ import ChartSkeleton from './charts/ChartSkeleton' import ChartsLoader from './charts/ChartsLoader' import { FixedHeightChartContainer } from './charts/FixedHeightChartContainer' import { YvUsdApyChart, YvUsdChartLegend, YvUsdPerformanceChart, YvUsdTvlChart } from './charts/YvUsdDualLineChart' -import { - DEFAULT_VAULT_CHART_TIMEFRAME, - VAULT_CHART_TABS, - type VAULT_CHART_TIMEFRAME_OPTIONS, - VaultChartTimeframeDropdown -} from './VaultChartsSection' +import { VAULT_CHART_TABS, type VAULT_CHART_TIMEFRAME_OPTIONS, VaultChartTimeframeDropdown } from './VaultChartsSection' const VaultTvlGrowthChart = lazy(() => import('./charts/VaultTvlGrowthChart').then((m) => ({ default: m.VaultTvlGrowthChart })) @@ -23,6 +18,7 @@ const VaultTvlGrowthChart = lazy(() => type TYvUsdUserChartTab = 'user-position' export type TYvUsdChartTab = (typeof VAULT_CHART_TABS)[number]['id'] | TYvUsdUserChartTab export type TYvUsdChartTimeframe = (typeof VAULT_CHART_TIMEFRAME_OPTIONS)[number]['value'] +const DEFAULT_YVUSD_CHART_TIMEFRAME: TYvUsdChartTimeframe = '90d' type YvUsdChartsSectionProps = { chartTab?: TYvUsdChartTab @@ -93,7 +89,7 @@ export function YvUsdChartsSection({ const [uncontrolledTab, setUncontrolledTab] = useState('historical-apy') const [uncontrolledTimeframe, setUncontrolledTimeframe] = - useState(DEFAULT_VAULT_CHART_TIMEFRAME) + useState(DEFAULT_YVUSD_CHART_TIMEFRAME) const activeTab = chartTab ?? uncontrolledTab const activeTimeframe = timeframe ?? uncontrolledTimeframe