demo mode

This commit is contained in:
Samuel Newman
2025-04-22 21:29:27 +03:00
committed by Eric Bailey
parent c34c67e4df
commit 91f9bc7ccb
5 changed files with 616 additions and 21 deletions
+20
View File
@@ -0,0 +1,20 @@
import {type AppBskyFeedDefs, type BskyAgent} from '@atproto/api'
import {DEMO_FEED} from '#/lib/demo'
import {type FeedAPI, type FeedAPIResponse} from './types'
export class DemoFeedAPI implements FeedAPI {
agent: BskyAgent
constructor({agent}: {agent: BskyAgent}) {
this.agent = agent
}
async peekLatest(): Promise<AppBskyFeedDefs.FeedViewPost> {
return DEMO_FEED.feed[0]
}
async fetch(): Promise<FeedAPIResponse> {
return DEMO_FEED
}
}