Mercedes slideshow

You have a component that displays a slideshow of images. Each image should be displayed for a certain amount of time before the next one is shown.

Use useEffect to create a timer that changes the image every 5 seconds, and then cleans up the timer when the component is unmounted.

Images:

output