mirror of
https://github.com/openziti/zrok.git
synced 2025-02-24 06:01:43 +01:00
error handling lint (#221)
This commit is contained in:
parent
2770090d84
commit
7e641a9275
@ -36,10 +36,8 @@ const NewAccessModal = ({ close, isOpen }: NewAccessModalProps) => {
|
|||||||
return (
|
return (
|
||||||
<Modal open={isOpen} onClose={close}>
|
<Modal open={isOpen} onClose={close}>
|
||||||
<Box sx={{...modalStyle}}>
|
<Box sx={{...modalStyle}}>
|
||||||
<Typography>
|
<Typography><h2>Access...</h2></Typography>
|
||||||
<h2>Access...</h2>
|
<Typography color="red"><h3>{errorMessage}</h3></Typography>
|
||||||
</Typography>
|
|
||||||
<Typography color={"red"}><h3>{errorMessage}</h3></Typography>
|
|
||||||
<form onSubmit={newAccessForm.handleSubmit}>
|
<form onSubmit={newAccessForm.handleSubmit}>
|
||||||
<TextField
|
<TextField
|
||||||
fullWidth
|
fullWidth
|
||||||
|
@ -29,7 +29,7 @@ const NewShareModal = ({ close, isOpen }: NewShareModalProps) => {
|
|||||||
close();
|
close();
|
||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
e.response().json().then(ex => {
|
e.response.json().then(ex => {
|
||||||
setErrorMessage(<span>{ex.message}</span>);
|
setErrorMessage(<span>{ex.message}</span>);
|
||||||
console.log(ex.message);
|
console.log(ex.message);
|
||||||
})
|
})
|
||||||
@ -43,7 +43,7 @@ const NewShareModal = ({ close, isOpen }: NewShareModalProps) => {
|
|||||||
})
|
})
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
e.response().json().then(ex => {
|
e.response().json().then(ex => {
|
||||||
setErrorMessage(<p>{ex.message}</p>);
|
setErrorMessage(<span>{ex.message}</span>);
|
||||||
console.log(ex.message);
|
console.log(ex.message);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
@ -55,10 +55,8 @@ const NewShareModal = ({ close, isOpen }: NewShareModalProps) => {
|
|||||||
return (
|
return (
|
||||||
<Modal open={isOpen} onClose={close}>
|
<Modal open={isOpen} onClose={close}>
|
||||||
<Box sx={{ ...modalStyle }}>
|
<Box sx={{ ...modalStyle }}>
|
||||||
<Typography>
|
<Typography><h2>Share...</h2></Typography>
|
||||||
<h2>Share...</h2>
|
<Typography color="red"><h3>{errorMessage}</h3></Typography>
|
||||||
</Typography>
|
|
||||||
{errorMessage}
|
|
||||||
<form onSubmit={form.handleSubmit}>
|
<form onSubmit={form.handleSubmit}>
|
||||||
<TextField
|
<TextField
|
||||||
fullWidth
|
fullWidth
|
||||||
|
Loading…
Reference in New Issue
Block a user