diff options
| author | Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> | 2025-07-22 00:17:50 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-22 00:17:50 -0400 |
| commit | 4fee88babae0dc69a332480c3e491500dab64d7c (patch) | |
| tree | 2e9ee6360337978e9264173a2e20daf5ec195393 /src/hooks/useLsfgHooks.ts | |
| parent | 2106ef8eb31ee46611fce07dd715d3ac1c4ca0ab (diff) | |
| parent | e83f026b0d1edf5a7ee1477f4b10eb574f506f95 (diff) | |
| download | decky-lsfg-vk-4fee88babae0dc69a332480c3e491500dab64d7c.tar.gz decky-lsfg-vk-4fee88babae0dc69a332480c3e491500dab64d7c.zip | |
Merge pull request #63 from xXJSONDeruloXx/cleanup-jul21
refactor: remove unused backend files and improve configuration handl…
Diffstat (limited to 'src/hooks/useLsfgHooks.ts')
| -rw-r--r-- | src/hooks/useLsfgHooks.ts | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/hooks/useLsfgHooks.ts b/src/hooks/useLsfgHooks.ts index e514d72..e5dea63 100644 --- a/src/hooks/useLsfgHooks.ts +++ b/src/hooks/useLsfgHooks.ts @@ -1,5 +1,4 @@ import { useState, useEffect, useCallback } from "react"; -import { toaster } from "@decky/api"; import { checkLsfgVkInstalled, checkLosslessScalingDll, @@ -8,6 +7,7 @@ import { type ConfigUpdateResult } from "../api/lsfgApi"; import { ConfigurationData, ConfigurationManager } from "../config/configSchema"; +import { showErrorToast, ToastMessages } from "../utils/toastUtils"; export function useInstallationStatus() { const [isInstalled, setIsInstalled] = useState<boolean>(false); @@ -95,17 +95,14 @@ export function useLsfgConfig() { if (result.success) { setConfig(newConfig); } else { - toaster.toast({ - title: "Update Failed", - body: result.error || "Failed to update configuration" - }); + showErrorToast( + ToastMessages.CONFIG_UPDATE_ERROR.title, + result.error || ToastMessages.CONFIG_UPDATE_ERROR.body + ); } return result; } catch (error) { - toaster.toast({ - title: "Update Failed", - body: `Error: ${error}` - }); + showErrorToast(ToastMessages.CONFIG_UPDATE_ERROR.title, String(error)); return { success: false, error: String(error) }; } }, []); |
