feat [2/3]: add feed viewing
This commit is contained in:
1 parent
5ed8346027
commit
82a8747ad4
6 files changed
+202
-10
No files matched your search
@@ -3,6 +3,7 @@ import { profile } from '$lib/auth.svelte'
|
||||
import type {
|
||||
CommentView,
|
||||
CommunityView,
|
||||
FeedView,
|
||||
GetComments,
|
||||
GetCommunityResponse,
|
||||
GetPersonDetails,
|
||||
@@ -48,7 +49,7 @@ export class Feed<Params, Response> {
|
||||
}
|
||||
}
|
||||
|
||||
interface FeedTypes {
|
||||
export interface FeedTypes {
|
||||
'/': [
|
||||
GetPosts,
|
||||
{
|
||||
@@ -94,6 +95,20 @@ interface FeedTypes {
|
||||
params: { posts: GetPost; comments: GetComments }
|
||||
},
|
||||
]
|
||||
'/f/[id]': [
|
||||
GetPosts,
|
||||
|
||||
{
|
||||
posts: PostView[]
|
||||
next_page?: string
|
||||
params: GetPosts
|
||||
feed: Promise<FeedView | undefined>
|
||||
client: {
|
||||
itemHeights?: (number | null)[]
|
||||
lastSeen?: number
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
const feeds = new SvelteMap<keyof FeedTypes, Feed<any, any>>()
|
||||
|
||||
Reference in new issue
Block a user