chore: changed debug code

This commit is contained in:
원더 2021-02-01 21:32:25 +09:00
parent 7a900f6a12
commit ad8d41cc0e

View File

@ -2,7 +2,7 @@ import { NextPage, NextPageContext } from 'next'
import { useRouter } from 'next/router' import { useRouter } from 'next/router'
import dynamic from 'next/dynamic' import dynamic from 'next/dynamic'
import Link from 'next/link' import Link from 'next/link'
import { FieldArray, Form, Formik } from 'formik' import { Form, Formik } from 'formik'
import { get } from '@utils/Query' import { get } from '@utils/Query'
import { parseCookie, redirectTo } from '@utils/Tools' import { parseCookie, redirectTo } from '@utils/Tools'
@ -46,11 +46,9 @@ const AddBot:NextPage<AddBotProps> = ({ logged }) => {
desc: '' desc: ''
}} }}
validationSchema={AddBotSubmitSchema} validationSchema={AddBotSubmitSchema}
onSubmit={() => { alert('Submit') }}> onSubmit={(values) => { alert(values) }}>
{({ errors, touched, values, setFieldTouched, setFieldValue }) => ( {({ errors, touched, values, setFieldTouched, setFieldValue }) => (
<Form> <Form>
{JSON.stringify(errors)}
{JSON.stringify(touched)}
<Message type='warning'> <Message type='warning'>
<h2 className='text-lg font-black'> !</h2> <h2 className='text-lg font-black'> !</h2>
<ul className='list-disc list-inside'> <ul className='list-disc list-inside'>
@ -128,7 +126,11 @@ const AddBot:NextPage<AddBotProps> = ({ logged }) => {
</Label> </Label>
</div> </div>
</div> */} </div> */}
<button type='submit'></button> <Button type='submit' onClick={() => window.scrollTo({ top: 0 })}>
<>
<i className='far fa-paper-plane'/>
</>
</Button>
</Form> </Form>
)} )}
</Formik> </Formik>