diff --git a/src/store/feed.ts b/src/store/feed.ts index 6185885..07d385b 100644 --- a/src/store/feed.ts +++ b/src/store/feed.ts @@ -3,6 +3,10 @@ import { Item } from "rss-parser"; export function toEvent(item: Item): FeedEventData { return { - guid: item.guid || item.link || item.title || Math.random().toString(32) + guid: item.guid || item.link || item.title || Math.random().toString(32), + title: item.title || "Unnamed event", + link: item.link, + creator: item.creator || "Unknown", + published: item.pubDate ? new Date(item.pubDate) : undefined }; } diff --git a/src/store/types.ts b/src/store/types.ts index 5da4b36..08419a8 100644 --- a/src/store/types.ts +++ b/src/store/types.ts @@ -21,6 +21,10 @@ export interface FeedEvent { export interface FeedEventData { guid: string; + title: string; + link?: string; + creator: string; + published?: Date; } export interface FetchStatus {