Replace router if connection failed

This commit is contained in:
Hongbo Wu 2023-05-15 17:53:24 +08:00
parent ed0952c362
commit a842fecf7f

View file

@ -116,10 +116,11 @@ export default function Integrations(): JSX.Element {
} else {
showErrorToast('There was an error connecting to Pocket.')
}
router.replace('/settings/integrations')
revalidate()
} catch (err) {
showErrorToast('Error: ' + err)
} finally {
router.replace('/settings/integrations')
revalidate()
}
}
if (!router.isReady) return