my function is like this:
async function handleFavorites(event: MouseEvent) { event.preventDefault();}
on my button, I'm using onclick to call this function but it's not working
<button type="submit" value={favorites} onChange={e => setFavorites(e.currentTarget.value)} onClick={() => { handleFavorites(); }}>
Error: Expected 1 arguments, but got 0.An argument for 'event' was not provided.
does anyone know how to solve? or have any tips?