Skip to content

Commit

Permalink
fix editor upload modal state
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendonovich committed Jan 29, 2025
1 parent c9f6016 commit f00395c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions apps/desktop/src/routes/editor/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,8 @@ function ShareButton(props: {
else if (result === "UpgradeRequired")
throw new Error("This feature requires an upgraded plan");

setUploadState({ type: "link-copied" });

return result;
} catch (error) {
console.error("Upload error:", error);
Expand All @@ -562,7 +564,8 @@ function ShareButton(props: {
onSettled() {
setTimeout(() => {
setUploadState({ type: "idle" });
}, 1500);
uploadVideo.reset();
}, 2000);
},
}));

Expand All @@ -586,7 +589,7 @@ function ShareButton(props: {
return (
<div class="relative">
<Show
when={recordingMeta()?.sharing}
when={recordingMeta.latest?.sharing}
fallback={
<Button
disabled={uploadVideo.isPending}
Expand Down
6 changes: 3 additions & 3 deletions apps/desktop/src/routes/recordings-overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ function createRecordingMutations(
onSuccess() {
setTimeout(() => {
setActionState({ type: "idle" });
}, 1500);
}, 2000);
},
}));

Expand Down Expand Up @@ -711,7 +711,7 @@ function createRecordingMutations(
onSettled() {
setTimeout(() => {
setActionState({ type: "idle" });
}, 1500);
}, 2000);
},
}));

Expand Down Expand Up @@ -838,7 +838,7 @@ function createRecordingMutations(
onSettled() {
setTimeout(() => {
setActionState({ type: "idle" });
}, 1500);
}, 2000);
},
onSuccess: () => startTransition(() => recordingMeta.refetch()),
}));
Expand Down

0 comments on commit f00395c

Please sign in to comment.