I have a small project, to fetch image from unsplash, even I check many times, I still have one problem in my code, I am running my code, but it is always give this error, but I don't get it. Any idea will be appreciated.
Mainboard.js
import React from 'react';
import styled from 'styled-components';
import Pin from './Pin';
function Mainboard(props) {
let { pins } = props;
return (
<Wrapper>
<Container>
{pins.map((pin, index) => {
let {urls} = pin;
return <Pin key={index} urls={urls}/>
})}
</Container>
</Wrapper>
)}
export default Mainboard;
Pin.js:
import React from 'react';
import styled from 'styled-components';
function Pin(props) {
let { urls } = props;
return (
<Wrapper>
<Container>
<img src={urls?.regular} alt="pin"/>
</Container>
</Wrapper>
)}
export default Pin;