summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hooks/useLsfgHooks.ts4
-rw-r--r--src/utils/toastUtils.ts4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/hooks/useLsfgHooks.ts b/src/hooks/useLsfgHooks.ts
index 73cfa0c..9beb749 100644
--- a/src/hooks/useLsfgHooks.ts
+++ b/src/hooks/useLsfgHooks.ts
@@ -57,7 +57,7 @@ export function useInstallation(reloadConfig?: () => Promise<void>) {
const result = await installLsfgVk();
if (!result.success) {
setInstallationStatus(`Installation failed: ${result.error}`);
- showInstallErrorToast(result.error);
+ showInstallErrorToast(result.error ?? undefined);
return;
}
setIsInstalled(true);
@@ -80,7 +80,7 @@ export function useInstallation(reloadConfig?: () => Promise<void>) {
const result = await uninstallLsfgVk();
if (!result.success) {
setInstallationStatus(`Uninstallation failed: ${result.error}`);
- showUninstallErrorToast(result.error);
+ showUninstallErrorToast(result.error ?? undefined);
return;
}
setIsInstalled(false);
diff --git a/src/utils/toastUtils.ts b/src/utils/toastUtils.ts
index 3468064..c41f4c0 100644
--- a/src/utils/toastUtils.ts
+++ b/src/utils/toastUtils.ts
@@ -5,7 +5,9 @@ export interface ToastOptions {
body: string;
}
-const showToast = (title: string, body: string): void => toaster.toast({ title, body });
+const showToast = (title: string, body: string): void => {
+ toaster.toast({ title, body });
+};
export const showSuccessToast = showToast;
export const showErrorToast = showToast;