Skip to content

Commit c11c53d

Browse files
committed
fix tests
1 parent 902eed5 commit c11c53d

2 files changed

Lines changed: 16 additions & 9 deletions

File tree

apps/studio/components/interfaces/ErrorHandling/error-mappings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export interface ErrorMapping {
99
Troubleshooting: ComponentType
1010
}
1111

12-
type ErrorConstructor = new (...args: any[]) => ClassifiedError
12+
type ErrorConstructor = new (...args: unknown[]) => ClassifiedError
1313

1414
export const ERROR_MAPPINGS = new Map<ErrorConstructor, ErrorMapping>([
1515
[

apps/studio/components/interfaces/Storage/StorageExplorer/FileExplorerHeader.tsx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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'
2330
import { useStorageExplorerStateSnapshot } from 'state/storage-explorer'
2431
import {
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

7582
const NavigateDialog = ({
@@ -192,7 +199,7 @@ const HeaderBreadcrumbs = ({
192199
interface 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

198205
export 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

Comments
 (0)