add range picker on dashboard
This commit is contained in:
8
apps/web/src/utils/getRangeLabel.ts
Normal file
8
apps/web/src/utils/getRangeLabel.ts
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user