Even when i copy pasted the code i got this error
Error: Functions are not valid as a child of Client Components. This may happen if you return children instead of from render. Or maybe you meant to call this function rather than return it.
<... className=... width="800" height=... center=... zoom=... children={function children}>
Is this related to using App Router???
Because when i cloned the repository it was working fine with pages directory
The issue arises in this snippet
<Map
className={styles.homeMap}
width="800"
height="400"
center={DEFAULT_CENTER}
zoom={12}
>
{({ TileLayer, Marker, Popup }) => (
<>
<TileLayer
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
attribution='© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
/>
<Marker position={DEFAULT_CENTER}>
<Popup>
A pretty CSS3 popup. <br /> Easily customizable.
</Popup>
</Marker>
</>
)}
</Map>
Any help would be great :)