export const eventCollection = createCollection(
localOnlyCollectionOptions({
id: 'all-events',
schema: EventSchema,
getKey: (event) => event.timestamp,
}),
)
export const pingEventCollection = createLiveQueryCollection({
id: 'ping-events',
query: (q) =>
q.from({ event: eventCollection }).where(({ event }) => eq(event.type, 'PingAdded')),
})
export const eventCollection = createCollection(
localOnlyCollectionOptions({
id: 'all-events',
schema: EventSchema,
getKey: (event) => event.timestamp,
}),
)
export const pingEventCollection = createLiveQueryCollection({
id: 'ping-events',
query: (q) =>
q.from({ event: eventCollection }).where(({ event }) => eq(event.type, 'PingAdded')),
})