feat: handling error

This commit is contained in:
wonderlandpark 2021-03-13 19:10:05 +09:00
parent 121b5c4a82
commit 2bfda5d128

View File

@ -205,6 +205,16 @@ const Bots: NextPage<BotsProps> = ({ data, date, user, theme, csrfToken, setThem
({ errors, touched, values, setFieldValue }) => (
<Form>
<div className='mb-5'>
{
reportRes && <div className='my-5'>
<Message type='error'>
<h2 className='text-lg font-semibold'>{reportRes.message}</h2>
<ul className='list-disc'>
{reportRes.errors?.map((el, n) => <li key={n}>{el}</li>)}
</ul>
</Message>
</div>
}
<h3 className='font-bold'> </h3>
<p className='text-gray-400 text-sm mb-1'> .</p>
{