fix: properly type onClose prop in ErrorDisplay component

This commit is contained in:
burnettk (aider) 2025-02-05 18:33:26 -05:00
parent 7a3445a9f4
commit bfdac637d5
No known key found for this signature in database

View File

@ -1,4 +1,4 @@
import React from 'react'; import React, { SyntheticEvent } from 'react';
import { Alert, AlertTitle } from '@mui/material'; import { Alert, AlertTitle } from '@mui/material';
import useAPIError from '../hooks/UseApiError'; import useAPIError from '../hooks/UseApiError';
import { import {
@ -154,7 +154,7 @@ export const childrenForErrorObject = (errorObject: ErrorForDisplay) => {
export function errorDisplayStateless( export function errorDisplayStateless(
errorObject: ErrorForDisplay, errorObject: ErrorForDisplay,
onClose?: Function, onClose?: (event: SyntheticEvent) => void,
) { ) {
const title = 'Error:'; const title = 'Error:';
const hideCloseButton = !onClose; const hideCloseButton = !onClose;