uploader and create service
This commit is contained in:
@@ -9,7 +9,9 @@ import { CreateServiceType, ServiceCategoryType } from '../types/ServiceTypes'
|
||||
import { useGetCategoryParents } from '../hooks/useServiceData'
|
||||
|
||||
type Props = {
|
||||
formik: FormikProps<CreateServiceType>
|
||||
formik: FormikProps<CreateServiceType>,
|
||||
onChangeIconFile: (file: File) => void,
|
||||
onChangeImagesFile: (file: File[]) => void
|
||||
}
|
||||
|
||||
const AddServiceSidebar: FC<Props> = (props: Props) => {
|
||||
@@ -76,7 +78,7 @@ const AddServiceSidebar: FC<Props> = (props: Props) => {
|
||||
<div className='mt-2'>
|
||||
<UploadBoxDraggble
|
||||
label={t('service.upload_icon_service')}
|
||||
onChange={() => null}
|
||||
onChange={(file: File[]) => props.onChangeIconFile(file[0])}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -85,7 +87,8 @@ const AddServiceSidebar: FC<Props> = (props: Props) => {
|
||||
<div className='mt-2'>
|
||||
<UploadBoxDraggble
|
||||
label={t('service.upload_images_service')}
|
||||
onChange={() => null}
|
||||
onChange={props.onChangeImagesFile}
|
||||
isMultiple
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user