diff options
Diffstat (limited to 'src/state/shell/post-progress.tsx')
-rw-r--r-- | src/state/shell/post-progress.tsx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/state/shell/post-progress.tsx b/src/state/shell/post-progress.tsx new file mode 100644 index 000000000..0df2a6be4 --- /dev/null +++ b/src/state/shell/post-progress.tsx @@ -0,0 +1,18 @@ +import React from 'react' + +interface PostProgressState { + progress: number + status: 'pending' | 'success' | 'error' | 'idle' + error?: string +} + +const PostProgressContext = React.createContext<PostProgressState>({ + progress: 0, + status: 'idle', +}) + +export function Provider() {} + +export function usePostProgress() { + return React.useContext(PostProgressContext) +} |