title: Reactjs condition inside map function
body: <p>I've looked at a bunch of questions here and read the docs over and over, however this just doesn't seem to want to work no matter what I do.</p>
  
  <p>This is supposed to return one thing if X is true and return something else if it's not. It's inside a map function because I need this to be done for multiple things at once.</p>
  
  <pre><code>    function ContentProcessing(props) {
  
          return (
              &lt;div&gt;
                  props.content.map(content =&gt; {
                          {content.type === "card" ? (
                              &lt;Card title={content.title} /&gt;
                          ) : (
                              &lt;Content title={content.title} paragraph={content.guideline} /&gt;
                          )}
                  })
              &lt;/div&gt;
          );
      }
  </code></pre>
  
  <p>both <code>&lt;Card /&gt;</code> and <code>&lt;Content /&gt;</code> return one string</p>
  
  <pre><code>However I get the error
  ./src/App.js
  Syntax error: /src/App.js: Unexpected token, expected , (79:13)
  
    77 |      &lt;div&gt;
    78 |          props.content.map(content =&gt; {
  &gt; 79 |                  {content.type === "card" ? (
       |                          ^
    80 |                      &lt;Card title={content.title} /&gt;
    81 |                  ) ? (
    82 |                      &lt;Content title={content.title} paragraph={content.guideline} /&gt;
  </code></pre>
  
  <p>I don't get why this isn't working. </p>