<Grid item>
{attributesState.attributesData.socialPlatform.map((platform) => {
<SocialButton
isSelected={socialPlatform === platform.name}
icon={<`${platform.name}Logo` />}
onClick={() => {
setSocialPlatform(SocialPlatform.BEHANCE);
}}
/>;
})}
I'm getting this error:
Type 'boolean' is not assignable to type 'ReactElement<any, string | JSXElementConstructor>'.ts(2322) component.tsx(7, 3): The expected type comes from property 'icon' which is declared here on type 'IntrinsicAttributes & SocialButtonProps' (JSX attribute) icon: React.ReactElement<any, string | React.JSXElementConstructor>