Исправлена работа очистки операций перед импортом

This commit is contained in:
goodmice 2022-09-12 12:40:59 +05:00
parent c8050b91e5
commit bd7c2842c5

View File

@ -6,7 +6,7 @@ import { ErrorFetch } from '@components/ErrorFetch'
import { UploadForm } from '@components/UploadForm'
const errorTextStyle = { color: 'red', fontWeight: 'bold' }
const uploadFormStyle = { marginTop: '24px' }
const uploadFormStyle = { marginTop: 24 }
export const ImportOperations = memo(({ well: givenWell, onDone }) => {
const [deleteBeforeImport, setDeleteBeforeImport] = useState(false)
@ -15,7 +15,7 @@ export const ImportOperations = memo(({ well: givenWell, onDone }) => {
const [wellContext] = useWell()
const well = useMemo(() => givenWell ?? wellContext, [givenWell, wellContext])
const url = useMemo(() => `/api/well/${well.id}/wellOperations/import${deleteBeforeImport ? '/1' : '/0'}`, [well])
const url = useMemo(() => `/api/well/${well.id}/wellOperations/import/${deleteBeforeImport ? 1 : 0}`, [well, deleteBeforeImport])
const onUploadSuccess = useCallback(() => {
setErrorText('')