1
0
Fork 0

fix(org): Handle errors when importing measurements" (#6836)

* fix(shared): Handle errors when importing files
This commit is contained in:
Joost De Cock 2024-06-12 13:54:53 +02:00 committed by GitHub
parent 7e9b8690b9
commit 3eaecf9b66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
// Dependencies
import { useState, useContext } from 'react'
import { useContext } from 'react'
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
@ -52,9 +52,8 @@ export const Importer = () => {
}
}
} catch (err) {
setError(err)
console.log(err)
setLoadingStatus([true, `Import of ${name} failed`, true, false])
setLoadingStatus([true, `Import of ${name || 'file'} failed`, true, false])
}
}