(now, start)
| 280 | }; |
| 281 | |
| 282 | export const calculateScrollPosition = (now, start) => { |
| 283 | const roundedNow = roundToNearest(now, 30); |
| 284 | const nowOffset = diff(roundedNow, start, 'minute'); |
| 285 | const scrollPosition = |
| 286 | (nowOffset / MINUTE_INCREMENT) * MINUTE_BLOCK_WIDTH - MINUTE_BLOCK_WIDTH; |
| 287 | |
| 288 | return Math.max(scrollPosition, 0); |
| 289 | }; |
| 290 | |
| 291 | export const matchChannelByTvgId = (channelIdByTvgId, channelById, tvgId) => { |
| 292 | const channelIds = channelIdByTvgId.get(String(tvgId)); |
no test coverage detected