'use client' import Image from 'next/image' import { useRef } from 'react' import { Control, FieldError, useFieldArray } from 'react-hook-form' import { UploadImage, Icons } from 'components' const ImageList = props => { //? Props const { control, errors } = props //? Refs // const inputRef = useRef(null) //? Form Hook const { fields, append, remove } = useFieldArray({ name: 'images', control, }) const handleAddUploadedImageUrl = url => append({ url }) //? Render(s) return (
{fields.map((image, idx) => (
product image
))}
) } export default ImageList