Cull unused files (#11029)

This commit is contained in:
Samuel Newman
2026-06-30 19:41:35 +03:00
committed by GitHub
parent bb20f234f3
commit ade5d2b783
17 changed files with 8 additions and 1495 deletions
-35
View File
@@ -1,35 +0,0 @@
import {type AppBskyFeedGetSuggestedFeeds} from '@atproto/api'
import {
type InfiniteData,
type QueryKey,
useInfiniteQuery,
} from '@tanstack/react-query'
import {STALE} from '#/state/queries'
import {useAgent} from '#/state/session'
const suggestedFeedsQueryKeyRoot = 'suggestedFeeds'
export const suggestedFeedsQueryKey = [suggestedFeedsQueryKeyRoot]
export function useSuggestedFeedsQuery() {
const agent = useAgent()
return useInfiniteQuery<
AppBskyFeedGetSuggestedFeeds.OutputSchema,
Error,
InfiniteData<AppBskyFeedGetSuggestedFeeds.OutputSchema>,
QueryKey,
string | undefined
>({
staleTime: STALE.HOURS.ONE,
queryKey: suggestedFeedsQueryKey,
queryFn: async ({pageParam}) => {
const res = await agent.app.bsky.feed.getSuggestedFeeds({
limit: 10,
cursor: pageParam,
})
return res.data
},
initialPageParam: undefined,
getNextPageParam: lastPage => lastPage.cursor,
})
}
-19
View File
@@ -1,19 +0,0 @@
import {createContext, useContext} from 'react'
interface PostProgressState {
progress: number
status: 'pending' | 'success' | 'error' | 'idle'
error?: string
}
const PostProgressContext = createContext<PostProgressState>({
progress: 0,
status: 'idle',
})
PostProgressContext.displayName = 'PostProgressContext'
export function Provider() {}
export function usePostProgress() {
return useContext(PostProgressContext)
}
-27
View File
@@ -1,27 +0,0 @@
import {createContext, useContext, useState} from 'react'
type StateContext =
| {
uri: string
isClip?: boolean
}
| undefined
type SetContext = (v: StateContext) => void
const stateContext = createContext<StateContext>(undefined)
stateContext.displayName = 'ActiveStarterPackStateContext'
const setContext = createContext<SetContext>((_: StateContext) => {})
setContext.displayName = 'ActiveStarterPackSetContext'
export function Provider({children}: {children: React.ReactNode}) {
const [state, setState] = useState<StateContext>()
return (
<stateContext.Provider value={state}>
<setContext.Provider value={setState}>{children}</setContext.Provider>
</stateContext.Provider>
)
}
export const useActiveStarterPack = () => useContext(stateContext)
export const useSetActiveStarterPack = () => useContext(setContext)