Bluesky app fork with some witchin' additions 馃挮
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at cope-settings-sync 19 lines 503 B view raw
1import {useCallback} from 'react' 2import {type BskyAgent} from '@atproto/api' 3 4import {type SessionAccount, useSessionApi} from '#/state/session' 5 6export function useRunWithEphemeralAgent() { 7 const {createEphemeralAgent} = useSessionApi() 8 9 return useCallback( 10 async <T>( 11 account: SessionAccount, 12 fn: (agent: BskyAgent) => Promise<T>, 13 ): Promise<T> => { 14 const agent = await createEphemeralAgent(account) 15 return await fn(agent) 16 }, 17 [createEphemeralAgent], 18 ) 19}