mirror of
https://github.com/reconurge/flowsint.git
synced 2026-05-10 04:38:59 -05:00
feat(app): better error management on import fail
This commit is contained in:
@@ -502,13 +502,13 @@ export function ImportPreview({
|
||||
|
||||
if (result.status === 'completed') {
|
||||
setTimeout(onSuccess, 2000)
|
||||
refetchGraph()
|
||||
setIsImporting(false)
|
||||
toast.success('Import successful!')
|
||||
}
|
||||
} catch (error) {
|
||||
toast.error('Failed to import')
|
||||
} finally {
|
||||
refetchGraph()
|
||||
setIsImporting(false)
|
||||
toast.success('Import successful!')
|
||||
toast.error('Failed to import. Check your types and try again.')
|
||||
}
|
||||
}, [mappingsById, sketchId, onSuccess, refetchGraph])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user