1
0
mirror of https://github.com/dwaxweiler/connector-mobilizon synced 2025-06-05 21:59:25 +02:00

simplify handling

This commit is contained in:
Daniel Waxweiler
2024-04-03 23:03:58 +02:00
parent 53231ee0fe
commit 208d2de4c1
3 changed files with 13 additions and 11 deletions

View File

@ -6,13 +6,12 @@ export function clearEventsList(container) {
list.replaceChildren()
}
export function displayEvents({ events, document, container }) {
export function displayEvents({ events, document, container, maxEventsCount }) {
hideLoadingIndicator(container)
const isShortOffsetNameShown =
window.MOBILIZON_CONNECTOR.isShortOffsetNameShown
const locale = window.MOBILIZON_CONNECTOR.locale
const maxEventsCount = container.getAttribute('data-maximum')
const timeZone = window.MOBILIZON_CONNECTOR.timeZone
const eventsCount = Math.min(maxEventsCount, events.length)