WIP ESLint fixes
This commit is contained in:
@ -59,13 +59,13 @@ export function ConfirmDialogProvider(
|
||||
|
||||
return (
|
||||
<>
|
||||
<ConfirmContextK.Provider value={hook}>
|
||||
<ConfirmContextK value={hook}>
|
||||
{p.children}
|
||||
</ConfirmContextK.Provider>
|
||||
</ConfirmContextK>
|
||||
|
||||
<Dialog
|
||||
open={open}
|
||||
onClose={() => handleClose(false)}
|
||||
onClose={() => { handleClose(false); }}
|
||||
aria-labelledby="alert-dialog-title"
|
||||
aria-describedby="alert-dialog-description"
|
||||
>
|
||||
@ -76,10 +76,10 @@ export function ConfirmDialogProvider(
|
||||
</DialogContentText>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={() => handleClose(false)} autoFocus>
|
||||
<Button onClick={() => { handleClose(false); }} autoFocus>
|
||||
{cancelButton ?? "Cancel"}
|
||||
</Button>
|
||||
<Button onClick={() => handleClose(true)} color="error">
|
||||
<Button onClick={() => { handleClose(true); }} color="error">
|
||||
{confirmButton ?? "Confirm"}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
@ -89,5 +89,5 @@ export function ConfirmDialogProvider(
|
||||
}
|
||||
|
||||
export function useConfirm(): ConfirmContext {
|
||||
return React.useContext(ConfirmContextK)!;
|
||||
return React.use(ConfirmContextK)!;
|
||||
}
|
||||
|
Reference in New Issue
Block a user