I'm exploring React-Router's Link and have set up the following:
<Link to={...}>{this.props.live? "Live": "Not Live"}</Link>
In this configuration, if this.props.live
is present, I want to display the text "Live" which will lead to a new page. However, if this.props.live
is not passed in, I aim to show the text "Not Live" but without an active hyperlink attached. Is there a way to achieve this effect? I attempted using
<div style={{pointerEvents: "none"}}>Not Live</div>
, but it did not yield the desired outcome.
If you have any insights or solutions to this problem, please share them with me. Your help is greatly appreciated, and I will be sure to upvote and accept the answer that best addresses this issue. Thank you!