import React, { Fragment } from 'react'; import { NavLink } from 'react-router-dom'; import PropTypes from 'prop-types'; import { Logo } from './components/logo'; import './header.css'; /** * Render the main header using a responsive design */ class Header extends React.Component { // TODO: add proper types static propTypes = { // TODO: generate propTypes from TS user: PropTypes.shape({ username: PropTypes.string }) }; constructor(props) { super(props); this.state = {collapseMenu: true}; this.handleClick = this.handleClick.bind(this); this.handleNavigate = this.handleNavigate.bind(this); } handleClick() { this.setState(state => ({ collapseMenu: !state.collapseMenu })); } handleNavigate() { this.setState({ collapseMenu: true }); } render() { return (
); } } export default Header;