var React = require('react'); var sections = require("./sections"); var sectionPages = Object.keys(sections); var SectionHeader = require("./SectionHeader.jsx"); var Navigation = React.createClass({ generateNavItem: function(name, entry) { var Type = sections[name]; var title = Type.defaultProps.title; var locale = SectionHeader.locale; if (typeof window !== "undefined" && window.location.toString().indexOf(locale) === -1) { locale = ''; } var fragmentid = `${locale ? './' + locale + '/': '.'}#${name}`; var link = { title }; var last = sectionPages.length - 1; if (entry===last) entry = null; return