mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fix revalidation
This commit is contained in:
parent
a842fecf7f
commit
87ef6f2d01
2 changed files with 4 additions and 3 deletions
|
|
@ -71,7 +71,8 @@ export function useGetIntegrationsQuery(): IntegrationsQueryResponse {
|
|||
return {
|
||||
isValidating: false,
|
||||
integrations: [],
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
revalidate: () => {},
|
||||
revalidate: () => {
|
||||
mutate()
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ export default function Integrations(): JSX.Element {
|
|||
enabled: true,
|
||||
})
|
||||
if (result) {
|
||||
revalidate()
|
||||
showSuccessToast('Connected with Pocket.')
|
||||
} else {
|
||||
showErrorToast('There was an error connecting to Pocket.')
|
||||
|
|
@ -120,7 +121,6 @@ export default function Integrations(): JSX.Element {
|
|||
showErrorToast('Error: ' + err)
|
||||
} finally {
|
||||
router.replace('/settings/integrations')
|
||||
revalidate()
|
||||
}
|
||||
}
|
||||
if (!router.isReady) return
|
||||
|
|
|
|||
Loading…
Reference in a new issue