import React from 'react' import { ZOOM_STEPS } from 'app/constants' import { timestamp } from 'app/utils' const CursorRegion = ({ timeline }) => { const { start_ts, zoom, cursor_region } = timeline if (!cursor_region) return null const secondsPerPixel = ZOOM_STEPS[zoom] * 0.1 const duration = cursor_region.b_ts - cursor_region.a_ts const y = (cursor_region.a_ts - start_ts) / secondsPerPixel const height = (duration) / secondsPerPixel return (
{timestamp(duration, 1, true)}
) } export default CursorRegion