diff --git a/src/modules/reserve-overview/TimeRangeSelector.tsx b/src/modules/reserve-overview/TimeRangeSelector.tsx index d90439795a..a374833bd9 100644 --- a/src/modules/reserve-overview/TimeRangeSelector.tsx +++ b/src/modules/reserve-overview/TimeRangeSelector.tsx @@ -28,6 +28,8 @@ export interface TimeRangeSelectorProps { const formattedInterval = (interval: TimeWindow) => { switch (interval) { + case TimeWindow.LastDay: + return '1d'; case TimeWindow.LastWeek: return '1w'; case TimeWindow.LastMonth: diff --git a/src/modules/reserve-overview/graphs/ApyGraph.tsx b/src/modules/reserve-overview/graphs/ApyGraph.tsx index 50780218a2..5ee39f7ec1 100644 --- a/src/modules/reserve-overview/graphs/ApyGraph.tsx +++ b/src/modules/reserve-overview/graphs/ApyGraph.tsx @@ -22,7 +22,7 @@ export type FormattedReserveHistoryItem = { /** * Formats the given date for the specified time range to display in the tooltip. * - * If the provided timeRange is '1m', the date will be formatted as 'MM DD, HH:MM UTC'. + * If the provided timeRange is '1d' or '1m', the date will be formatted as 'MM DD, HH:MM UTC'. * For example, a date of `Wed Sep 21 2022 18:00:00 GMT-0500 (Central Daylight Time)` will be formatted as `Sep 21, 18:00 UTC-05:00` * * If the provided timeRange is '6m' or '1y', the date will be formatted as 'MM DD, YYYY'. @@ -33,7 +33,7 @@ export type FormattedReserveHistoryItem = { * */ const formatDate = (d: Date, timeRange: TimeWindow) => { - if (timeRange === TimeWindow.LastMonth) { + if (timeRange === TimeWindow.LastDay || timeRange === TimeWindow.LastMonth) { const formatted = timeFormat('%b %d, %H:%M UTC%Z'); const date = formatted(d); const offsetSign = date.toString().split('UTC')[1].split('')[0]; diff --git a/src/modules/reserve-overview/graphs/ApyGraphContainer.tsx b/src/modules/reserve-overview/graphs/ApyGraphContainer.tsx index 19888fef1c..da88cf8851 100644 --- a/src/modules/reserve-overview/graphs/ApyGraphContainer.tsx +++ b/src/modules/reserve-overview/graphs/ApyGraphContainer.tsx @@ -42,7 +42,7 @@ type ApyGraphProps = { }; export const SupplyApyGraph = ({ chain, underlyingToken, market }: ApyGraphProps) => { - const [selectedTimeRange, setSelectedTimeRange] = useState(TimeWindow.LastWeek); + const [selectedTimeRange, setSelectedTimeRange] = useState(TimeWindow.LastDay); const { palette } = useTheme(); const { data, loading, error } = useSupplyAPYHistory({ @@ -66,7 +66,7 @@ export const SupplyApyGraph = ({ chain, underlyingToken, market }: ApyGraphProps }; export const BorrowApyGraph = ({ chain, underlyingToken, market }: ApyGraphProps) => { - const [selectedTimeRange, setSelectedTimeRange] = useState(TimeWindow.LastWeek); + const [selectedTimeRange, setSelectedTimeRange] = useState(TimeWindow.LastDay); const { palette } = useTheme(); const { data, loading, error } = useBorrowAPYHistory({ diff --git a/src/modules/reserve-overview/graphs/GraphTimeRangeSelector.tsx b/src/modules/reserve-overview/graphs/GraphTimeRangeSelector.tsx index f384b426ab..f9ccbc2627 100644 --- a/src/modules/reserve-overview/graphs/GraphTimeRangeSelector.tsx +++ b/src/modules/reserve-overview/graphs/GraphTimeRangeSelector.tsx @@ -16,6 +16,7 @@ export const GraphTimeRangeSelector = ({