mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
use callback
This commit is contained in:
parent
592a759b8d
commit
051e6a2b56
1 changed files with 2 additions and 2 deletions
|
|
@ -41,13 +41,13 @@ export default function Notion(): JSX.Element {
|
|||
})
|
||||
}, [form, notion])
|
||||
|
||||
const deleteNotion = async () => {
|
||||
const deleteNotion = useCallback(async () => {
|
||||
await deleteIntegrationMutation(notion.id)
|
||||
showSuccessToast('Notion integration disconnected successfully.')
|
||||
|
||||
revalidate()
|
||||
router.push('/settings/integrations')
|
||||
}
|
||||
}, [notion.id, router])
|
||||
|
||||
const updateNotion = async (values: FieldType) => {
|
||||
await setIntegrationMutation({
|
||||
|
|
|
|||
Loading…
Reference in a new issue