@@ -16,6 +16,7 @@ import { TransformedAcl } from "../../../../slices/aclDetailsSlice";
1616import { renderValidDate } from "../../../../utils/dateUtils" ;
1717import { ParseKeys } from "i18next" ;
1818import ModalContentTable from "../../../shared/modals/ModalContentTable" ;
19+ import { UploadAssetsTrack } from "../../../../slices/eventSlice" ;
1920
2021/**
2122 * This component renders the summary page for new events in the new event wizard.
@@ -37,6 +38,7 @@ interface RequiredFormProps {
3738 deviceInputs ?: string [ ]
3839 configuration : { [ key : string ] : string }
3940 policies : TransformedAcl [ ]
41+ uploadAssetsTrack ?: UploadAssetsTrack [ ]
4042 [ key : string ] : unknown , // Metadata fields
4143}
4244
@@ -57,7 +59,7 @@ const NewEventSummary = <T extends RequiredFormProps>({
5759 const [ uploadAssetsNonTrack , setUploadAssetsNonTrack ] = useState < {
5860 name : string ,
5961 translate ?: string ,
60- value : any ,
62+ value : File ,
6163 } [ ] > ( [ ] ) ;
6264
6365 const uploadAssetOptions = useAppSelector ( state => getAssetUploadOptions ( state ) ) ;
@@ -70,10 +72,10 @@ const NewEventSummary = <T extends RequiredFormProps>({
7072 const uploadAssetsNonTrack : {
7173 name : string ,
7274 translate ?: string ,
73- value : any ,
75+ value : File ,
7476 } [ ] = [ ] ;
7577 for ( let i = 0 ; uploadAssetOptions . length > i ; i ++ ) {
76- const fieldValue = formik . values [ uploadAssetOptions [ i ] . id ] ;
78+ const fieldValue = formik . values [ uploadAssetOptions [ i ] . id ] as File ;
7779 if ( fieldValue ) {
7880 const displayOverride = uploadAssetOptions [ i ] . displayOverride as ParseKeys ;
7981 setUploadAssetsNonTrack ( uploadAssetsNonTrack . concat ( {
@@ -155,8 +157,7 @@ const NewEventSummary = <T extends RequiredFormProps>({
155157 < table className = "main-tbl" >
156158 < tbody >
157159 { /*Insert row for each upload asset of type track user has provided*/ }
158- { /* @ts -expect-error TS(7006): Parameter 'asset' implicitly has an 'any' type. */ }
159- { formik . values . uploadAssetsTrack . map ( ( asset , key ) =>
160+ { formik . values . uploadAssetsTrack && formik . values . uploadAssetsTrack . map ( ( asset , key ) =>
160161 asset . file ? (
161162 < tr key = { key } >
162163 < td >
0 commit comments