fix(org): Handle errors when importing measurements" (#6836)
* fix(shared): Handle errors when importing files
This commit is contained in:
parent
7e9b8690b9
commit
3eaecf9b66
1 changed files with 2 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
// Dependencies
|
// Dependencies
|
||||||
import { useState, useContext } from 'react'
|
import { useContext } from 'react'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
// Context
|
// Context
|
||||||
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
|
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
|
||||||
|
@ -52,9 +52,8 @@ export const Importer = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError(err)
|
|
||||||
console.log(err)
|
console.log(err)
|
||||||
setLoadingStatus([true, `Import of ${name} failed`, true, false])
|
setLoadingStatus([true, `Import of ${name || 'file'} failed`, true, false])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue