// External imports import * as React from "react" import { Link } from "react-router-dom" // Internal imports import * as ce from "../../../helpers/componentEnhancer" import * as userActions from "../../../actions/user" import Burger from "./burger" import NavbarItem from "./navbarItem" export interface ParentProps {} interface StateProps { burgerOpen: boolean userEmail: string } interface DispatchProps { logOut: () => void } interface LocalState {} class Header extends React.Component< ParentProps & StateProps & DispatchProps & ce.EnhancedPropsPrivate, LocalState > { render() { return (
) } } const stateMappings: ce.StateMappings = (s, props) => ({ burgerOpen: s.ui.navbarBurgerOpen, userEmail: s.user.userInfo.email }) const dispatchMappings: ce.DispatchMappings = (d, props) => ({ logOut: () => { d(userActions.logOut(props.module.api)) } }) export default ((): React.ComponentType => ce.enhance(Header, { stateMappings, dispatchMappings }))()