-
-
- {
- ({ insert, remove, push }) => (
- <>
-
-
- {
- options.filter(el => el.includes(formik.values.search) && !value.includes(el)).length !== 0 ? options.filter(el => el.includes(formik.values.search) && !value.includes(el)).map(el=> (
- - push(el)} onKeyPress={()=> push(el)} >{el}
- )) : - 검색 결과가 없습니다.
- }
-
-
-
- {
- value.map(el => (
- {el} >} className='cursor-pointer' onClick={() => remove(value.indexOf(el))} />
- ))
- }
-
- >
- )
- }
-
-
-
+ option: (provided) => {
+ return { ...provided, cursor: 'pointer', ':hover': {
+ opacity: '0.7'
+ } }
+ }
+ }} isMulti className='border border-grey-light dark:border-transparent' classNamePrefix='outline-none text-black dark:bg-very-black dark:text-white cursor-pointer ' placeholder={placeholder || '선택해주세요.'} options={options} onChange={handleChange} onBlur={handleTouch} noOptionsMessage={() => '검색 결과가 없습니다.'}/>
}
-interface SelectsProps {
- name: string
- value: string[]
- options: string[]
+interface SelectProps {
+ placeholder?: string
+ handleChange: (value: Option[]) => void
+ handleTouch: () => void
+ options: Option[]
}
-export default Selects
\ No newline at end of file
+interface Option {
+ value: string
+ label: string
+}
+
+export default Select
\ No newline at end of file
diff --git a/pages/addbot.tsx b/pages/addbot.tsx
index 27e6a00..37201be 100644
--- a/pages/addbot.tsx
+++ b/pages/addbot.tsx
@@ -2,7 +2,7 @@ import { NextPage, NextPageContext } from 'next'
import { useRouter } from 'next/router'
import dynamic from 'next/dynamic'
import Link from 'next/link'
-import { Form, Formik } from 'formik'
+import { FieldArray, Form, Formik } from 'formik'
import { get } from '@utils/Query'
import { parseCookie, redirectTo } from '@utils/Tools'
@@ -47,7 +47,7 @@ const AddBot:NextPage