mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-02-23 14:48:35 +00:00
fix: properly type onClose prop in ErrorDisplay component
This commit is contained in:
parent
7a3445a9f4
commit
bfdac637d5
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user