@@ -19,7 +19,14 @@ import {
1919 Upload ,
2020 X ,
2121} from 'lucide-react'
22- import { useEffect , useRef , useState } from 'react'
22+ import {
23+ type ChangeEvent ,
24+ type ChangeEventHandler ,
25+ type SyntheticEvent ,
26+ useEffect ,
27+ useRef ,
28+ useState ,
29+ } from 'react'
2330import { useStorageExplorerStateSnapshot } from 'state/storage-explorer'
2431import {
2532 Button ,
@@ -67,9 +74,9 @@ interface NavigateDialogProps {
6774 open : boolean
6875 pathString : string
6976 onOpenChange : ( open : boolean ) => void
70- onPathStringChange : ( event : any ) => void
77+ onPathStringChange : ChangeEventHandler < HTMLInputElement >
7178 onCancel : ( ) => void
72- onSubmit : ( event ?: any ) => void
79+ onSubmit : ( event ?: SyntheticEvent ) => void
7380}
7481
7582const NavigateDialog = ( {
@@ -192,7 +199,7 @@ const HeaderBreadcrumbs = ({
192199interface FileExplorerHeader {
193200 itemSearchString : string
194201 setItemSearchString : ( value : string ) => void
195- onFilesUpload : ( event : any , columnIndex ?: number ) => void
202+ onFilesUpload : ( event : ChangeEvent < HTMLInputElement > , columnIndex ?: number ) => void
196203}
197204
198205export const FileExplorerHeader = ( {
@@ -210,8 +217,8 @@ export const FileExplorerHeader = ({
210217 const [ isPathDialogOpen , setIsPathDialogOpen ] = useState ( false )
211218 const [ isRefreshing , setIsRefreshing ] = useState ( false )
212219
213- const uploadButtonRef : any = useRef ( null )
214- const previousBreadcrumbs : any = useRef ( null )
220+ const uploadButtonRef = useRef < HTMLInputElement | null > ( null )
221+ const previousBreadcrumbs = useRef < string [ ] | null > ( null )
215222
216223 const {
217224 columns,
@@ -263,11 +270,11 @@ export const FileExplorerHeader = ({
263270 if ( snap . isSearching ) onCancelSearch ( )
264271 }
265272
266- const onUpdatePathString = ( event : any ) => {
273+ const onUpdatePathString = ( event : ChangeEvent < HTMLInputElement > ) => {
267274 setPathString ( event . target . value )
268275 }
269276
270- const navigateByPathString = ( event : any ) => {
277+ const navigateByPathString = ( event ?: SyntheticEvent ) => {
271278 if ( event ) {
272279 event . preventDefault ( )
273280 event . stopPropagation ( )
0 commit comments