Revize 812b9f90
Přidáno uživatelem Václav Honzík před asi 2 roky(ů)
frontend/src/features/TrackingTool/Upload/GeoJsonImportDialog.tsx | ||
---|---|---|
1 |
import { Button, Dialog, DialogContent, DialogTitle } from '@mui/material'
|
|
1 |
import { DialogContent, DialogTitle } from '@mui/material' |
|
2 | 2 |
import { useFormik } from 'formik' |
3 |
import { Fragment, useState } from 'react' |
|
4 |
import { useDispatch, useSelector } from 'react-redux' |
|
5 |
import { RootState } from '../../redux/store' |
|
3 |
import { useState } from 'react' |
|
4 |
import { useDispatch } from 'react-redux' |
|
6 | 5 |
import ButtonOpenableDialog from '../../Reusables/ButtonOpenableDialog' |
7 |
import { PathVariant } from '../pathUtils' |
|
8 | 6 |
import * as yup from 'yup' |
9 | 7 |
import { showNotification } from '../../Notification/notificationSlice' |
10 | 8 |
import SingleFileSelectionForm from '../../Reusables/SingleFileSelectionForm' |
... | ... | |
58 | 56 |
reader.readAsText(values.file as File) |
59 | 57 |
reader.onload = async () => { |
60 | 58 |
try { |
61 |
const pathVariant = parseGeoJsonToPathVariant(reader.result as string) |
|
62 |
console.log(pathVariant) |
|
59 |
const pathVariant = parseGeoJsonToPathVariant( |
|
60 |
reader.result as string |
|
61 |
) |
|
63 | 62 |
// Merge current path variant with the new one |
64 | 63 |
dispatch(mergeWithCurrentPath(pathVariant)) |
65 | 64 |
onClose() |
Také k dispozici: Unified diff
draggable list start
re #9741