From b30508aef8cd19625640ee650b58b557bb3fdd24 Mon Sep 17 00:00:00 2001
From: Vendicated <vendicated@riseup.net>
Date: Tue, 15 Nov 2022 17:29:31 +0100
Subject: better handling for settings ui errors

---
 src/components/Updater.tsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/components/Updater.tsx')

diff --git a/src/components/Updater.tsx b/src/components/Updater.tsx
index a11d65b..8abdf28 100644
--- a/src/components/Updater.tsx
+++ b/src/components/Updater.tsx
@@ -24,6 +24,7 @@ import { Alerts, Button, Card, Forms, Margins, Parser, React, Toasts } from "../
 import ErrorBoundary from "./ErrorBoundary";
 import { ErrorCard } from "./ErrorCard";
 import { Flex } from "./Flex";
+import { handleComponentFailed } from "./handleComponentFailed";
 import { Link } from "./Link";
 
 function withDispatcher(dispatcher: React.Dispatch<React.SetStateAction<boolean>>, action: () => any) {
@@ -209,4 +210,7 @@ function Updater() {
     );
 }
 
-export default IS_WEB ? null : ErrorBoundary.wrap(Updater);
+export default IS_WEB ? null : ErrorBoundary.wrap(Updater, {
+    message: "Failed to render the Updater. If this persists, try using the installer to reinstall!",
+    onError: handleComponentFailed,
+});
-- 
cgit 

