about summary refs log tree commit diff
path: root/src/state/shell
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-07-30 08:25:31 -0700
committerGitHub <noreply@github.com>2024-07-30 08:25:31 -0700
commit8ddb28d3c54b63fb81ca361e741e5a6a46c1d25f (patch)
treeb62aa2dbfb2b9b8d84efbe9ff2a4ef6124dc1bed /src/state/shell
parent43ba0f21f6796ebbdd0156c9fa89ebc7d56376e7 (diff)
downloadvoidsky-8ddb28d3c54b63fb81ca361e741e5a6a46c1d25f.tar.zst
[Video] Uploads (#4754)
* state for video uploads

* get upload working

* add a debug log

* add post progress

* progress

* fetch data

* add some progress info, web uploads

* post on finished uploading (wip)

* add a note

* add some todos

* clear video

* merge some stuff

* convert to `createUploadTask`

* patch expo modules core

* working native upload progress

* platform fork

* upload progress for web

* cleanup

* cleanup

* more tweaks

* simplify

* fix type errors

---------

Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com>
Diffstat (limited to 'src/state/shell')
-rw-r--r--src/state/shell/post-progress.tsx18
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)
+}