From 3f5415dd9b6af0e50448ec938020c85d7eb19f85 Mon Sep 17 00:00:00 2001 From: luciob Date: Thu, 26 Oct 2023 18:44:50 +0200 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20[Timeline]=20Current?= =?UTF-8?q?ly=20switch=20back=20to=20start/end=20unit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/grid/Cells/index.tsx | 8 ++++---- src/utils/time.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/grid/Cells/index.tsx b/src/grid/Cells/index.tsx index 2a80bd4..8e51458 100644 --- a/src/grid/Cells/index.tsx +++ b/src/grid/Cells/index.tsx @@ -3,20 +3,20 @@ import React, { memo } from "react"; import { KonvaGroup } from "../../@konva"; import { useTimelineContext } from "../../timeline/TimelineContext"; import GridCell from "../Cell"; -import GridCellGroup from "../CellGroup"; +// import GridCellGroup from "../CellGroup"; interface GridCellsProps { height: number; } const GridCells = ({ height }: GridCellsProps) => { - const { aboveTimeBlocks, visibleTimeBlocks } = useTimelineContext(); + const { /*aboveTimeBlocks,*/ visibleTimeBlocks } = useTimelineContext(); return ( - {aboveTimeBlocks.map((column, index) => ( + {/* {aboveTimeBlocks.map((column, index) => ( - ))} + ))} */} {visibleTimeBlocks.map((column, index) => ( ))} diff --git a/src/utils/time.ts b/src/utils/time.ts index dd39040..489cb1b 100644 --- a/src/utils/time.ts +++ b/src/utils/time.ts @@ -52,7 +52,7 @@ export const getIntervalFromInternalTimeRange = ( timezone: string | undefined ): Interval => { const tz = timezone || "system"; - const startDateTime = DateTime.fromMillis(start, { zone: tz }).startOf(resolution.unitAbove); - const endDateTime = DateTime.fromMillis(end, { zone: tz }).endOf(resolution.unitAbove); + const startDateTime = DateTime.fromMillis(start, { zone: tz }).startOf(resolution.unit); + const endDateTime = DateTime.fromMillis(end, { zone: tz }).endOf(resolution.unit); return Interval.fromDateTimes(startDateTime, endDateTime); };