add range picker on dashboard

This commit is contained in:
Carl-Gerhard Lindesvärd
2023-10-28 22:17:20 +02:00
parent 7e40c2e391
commit e0cc9ef83b
2 changed files with 49 additions and 9 deletions

View File

@@ -0,0 +1,8 @@
import { type IChartRange } from "@/types";
import { timeRanges } from "./constants";
export function getRangeLabel(range: IChartRange) {
return timeRanges.find(
(item) => item.range === range,
)?.title ?? null
}