Cull unused files (#11029)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user