import React, { Component } from 'react'; import { Link } from "react-router-dom"; import * as routes from './../../../constants/routes'; import { UserContext } from './../../../containers/header'; import token from './../../../utils/token'; export default class header extends Component { state = { togglerClosed: true, } handleToggle = event => { this.setState((prevState) => ({ togglerClosed: !prevState.togglerClosed })) } handleSignOut = () => { console.log("signOut", this.props); this.props.signOut(); localStorage.removeItem(token); } render() { const { togglerClosed } = this.state; const { user: { data } } = this.props; const toggleStatus = togglerClosed ? "toggle-status--closed" : "toggle-status--opened"; return (

Test.io


{/* */}
{ !data ? ( Sign in Sign up ) : ( ) }
) } }