Bump welshman

This commit is contained in:
Jon Staab
2024-12-11 16:59:16 -08:00
parent 167cd045f4
commit daf5cc84bd
6 changed files with 58 additions and 54 deletions
+10
View File
@@ -251,6 +251,16 @@ export const getUrlsForEvent = derived([trackerStore, thunks], ([$tracker, $thun
}
})
export const getEventsForUrl = (url: string, filters: Filter[]) => {
const $getUrlsForEvent = get(getUrlsForEvent)
const $events = repository.query(filters)
return sortBy(
e => -e.created_at,
$events.filter(e => $getUrlsForEvent(e.id).includes(url)),
)
}
export const deriveEventsForUrl = (url: string, filters: Filter[]) =>
derived([deriveEvents(repository, {filters}), getUrlsForEvent], ([$events, $getUrlsForEvent]) =>
sortBy(