We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5926e1 commit e72fc13Copy full SHA for e72fc13
src/Events/Events.js
@@ -22,15 +22,9 @@ const EVENTS_CONTAINER_WIDTH = CONTAINER_WIDTH - EVENT_HORIZONTAL_PADDING;
22
const MIN_ITEM_WIDTH = 4;
23
const ALLOW_OVERLAP_SECONDS = 2;
24
25
-const areEventsOverlapped = (
26
- event1,
27
- event2,
28
- allowSeconds = ALLOW_OVERLAP_SECONDS,
29
-) => {
+const areEventsOverlapped = (event1, event2) => {
30
const endDate = moment(event1.endDate);
31
- if (allowSeconds && allowSeconds > 0) {
32
- endDate.subtract(allowSeconds, 'seconds');
33
- }
+ endDate.subtract(ALLOW_OVERLAP_SECONDS, 'seconds');
34
return endDate.isSameOrAfter(event2.startDate);
35
};
36
0 commit comments