mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
add default to reducer
This commit is contained in:
parent
78a0b5e6c9
commit
eb3f50c9f0
@ -88,7 +88,7 @@ export function EventCard({ camera, event, delay }) {
|
|||||||
const position = differenceInSeconds(start, startOfHour(start));
|
const position = differenceInSeconds(start, startOfHour(start));
|
||||||
const offset = Object.entries(delay)
|
const offset = Object.entries(delay)
|
||||||
.map(([p, d]) => (position > p ? d : 0))
|
.map(([p, d]) => (position > p ? d : 0))
|
||||||
.reduce((p, c) => p + c);
|
.reduce((p, c) => p + c, 0);
|
||||||
const seconds = Math.max(position - offset - 10, 0);
|
const seconds = Math.max(position - offset - 10, 0);
|
||||||
return (
|
return (
|
||||||
<Link className="" href={`/recording/${camera}/${format(start, 'yyyy-MM-dd')}/${format(start, 'HH')}/${seconds}`}>
|
<Link className="" href={`/recording/${camera}/${format(start, 'yyyy-MM-dd')}/${format(start, 'HH')}/${seconds}`}>
|
||||||
|
Loading…
Reference in New Issue
Block a user