feat [3/3]: add topic viewing

This commit is contained in:
James Xylight authored and xylight committed 2025-09-17 00:27:11 +00:00
1 parent 82a8747ad4
commit a82d8c296d
14 files changed
+422 -319

No files matched your search

+14
View File
@@ -11,6 +11,7 @@ import type {
GetPost,
GetPosts,
PostView,
TopicView,
} from '$lib/client/types'
import { recursiveEqual } from '$lib/util.svelte'
import { SvelteMap } from 'svelte/reactivity'
@@ -109,6 +110,19 @@ export interface FeedTypes {
}
},
]
'/topic/[id]': [
GetPosts,
{
posts: PostView[]
next_page?: string
params: GetPosts
topic: Promise<TopicView | undefined>
client: {
itemHeights?: (number | null)[]
lastSeen?: number
}
},
]
}
const feeds = new SvelteMap<keyof FeedTypes, Feed<any, any>>()