fix: replace toast.warn with toast.warning in Immich save handler

toast.warn does not exist in the toast library; calling it threw an error
that was caught and displayed as "Could not connect to Immich" even when
the save succeeded. Fixes #309.
This commit is contained in:
jubnl
2026-04-02 13:58:35 +02:00
parent 32b63adc68
commit 45e0c7e546

View File

@@ -148,7 +148,7 @@ export default function SettingsPage(): React.ReactElement {
setSaving(s => ({ ...s, immich: true }))
try {
const saveRes = await apiClient.put('/integrations/immich/settings', { immich_url: immichUrl, immich_api_key: immichApiKey || undefined })
if (saveRes.data.warning) toast.warn(saveRes.data.warning)
if (saveRes.data.warning) toast.warning(saveRes.data.warning)
toast.success(t('memories.saved'))
const res = await apiClient.get('/integrations/immich/status')
setImmichConnected(res.data.connected)