diff --git a/src/pages/WellOperations/ImportOperations.jsx b/src/pages/WellOperations/ImportOperations.jsx index cc0062b..304be1a 100755 --- a/src/pages/WellOperations/ImportOperations.jsx +++ b/src/pages/WellOperations/ImportOperations.jsx @@ -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('')