The code is as follows:
<BarberImage {...getRootProps()} profileImageURL={newBarber.profileImageURL}>
<input {...getInputProps()} />
<Upload height={40} />
</BarberImage>
The syntax highlight when compiling LaTeX is

It looks like it fails to recognize the function inside the prop spreading