I'm a little rusty here and note sure what is going on. Here is my file:
import React from 'react';
import './Navbar.css';
import {CONTENT_LINKS_PRESENTABLE, CONTENT_LINKS_SLUG} from '../../globals'
import {Link} from "react-router-dom";
function Navbar() {
let jsx = (<div className="navbar">
<div className="navbar-item">
<Link to="/" id="navbar-brand">Daniel Pahor</Link>
</div>
<div id="navbar-items">
{for (let content in CONTENT_LINKS_PRESENTABLE) {
<div className="navbar-item">
<Link to={CONTENT_LINKS_SLUG[content]} className="navbar-link">{CONTENT_LINKS_PRESENTABLE[content]}</Link>
</div>
}}
</div>
</div>)
return jsx;
}
export default Navbar;
I am getting the following error:
Parsing error: unexpected token
On line 13 (i.e. when the for loop begins)
Considering that I have embedded the JS code in the {} tags I'm not sure why this is failing