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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user