I want to display a different link in this map function,
If x is for example 3 i want to show<Link>Put</Link> otherwise i want to show <Link>Remove</Link>. I am trying to do some conditional but i get errors, how can i write it down?
const mapWorkplace = (arr: SuggestedWorkplace[], deallocation: boolean) =>
arr.map((x, i) => ({
...x,
action: <Link>Put</Link> || <Link>Remove</Link> ,
__props: {
style: { background: !(i % 2) ? "#fff" : "rgba(233, 249, 249, .6)" }
}
}));