Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 14588cb6

Přidáno uživatelem Václav Honzík před asi 2 roky(ů)

  • ID 14588cb653e6b7358e0e641cc2b8d45dc27b5cf8
  • Rodič fc8a530f

fixed keys and indices

re #9741

Zobrazit rozdíly:

frontend/src/features/TrackingTool/Upload/FileUpload.tsx
1 1
import {
2
    Button,
3 2
    DialogContent,
4 3
    DialogTitle,
5
    Link,
6
    Stack,
7
    Typography,
8 4
} from '@mui/material'
9 5
import { useFormik } from 'formik'
10
import { Fragment, useState } from 'react'
6
import { useState } from 'react'
11 7
import * as yup from 'yup'
12
import axiosInstance from '../../../api/api'
13 8
import ButtonOpenableDialog from '../../Reusables/ButtonOpenableDialog'
14
import { useDispatch } from 'react-redux'
9
import { useDispatch, useSelector } from 'react-redux'
15 10
import { sendTextForProcessing } from '../trackingToolThunks'
16 11
import SingleFileSelectionForm from '../../Reusables/SingleFileSelectionForm'
17 12
import AttachFileIcon from '@mui/icons-material/AttachFile'
18
import TextSnippetIcon from '@mui/icons-material/TextSnippet'
13
import { RootState } from '../../redux/store'
19 14

  
20 15
interface UploadValues {
21 16
    file?: File
......
34 29
        file: yup.mixed().required('File is required'),
35 30
    })
36 31

  
32
    const loading = useSelector(
33
        (state: RootState) => state.trackingTool.isLoading
34
    )
35

  
37 36
    const formik = useFormik({
38 37
        initialValues,
39 38
        validationSchema,
......
88 87
                    onClearSelectedFile={onClearSelectedFile}
89 88
                    filename={filename}
90 89
                    formik={formik}
90
                    loading={loading}
91 91
                />
92 92
            </DialogContent>
93 93
        </ButtonOpenableDialog>

Také k dispozici: Unified diff