fix(ui): error-handle fire-and-forget mutations in settings panels

This commit is contained in:
Gabriel Brown committed 2026-07-11 16:59:16 -04:00
1 parent 8c579d060a
commit bca86196fb
5 files changed
+185 -34

No files matched your search

@@ -223,8 +223,16 @@ export const SpoonClonePanel = ({ spoon }: { spoon: Doc<'spoons'> }) => {
remoteName={remote.remoteName}
url={remote.url}
onRemove={async () => {
await removeRemote({ remoteId: remote._id });
toast.success('Remote removed.');
try {
await removeRemote({ remoteId: remote._id });
toast.success('Remote removed.');
} catch (error) {
toast.error(
error instanceof Error
? error.message
: 'Could not remove remote.',
);
}
}}
/>
))}