import React, { Component } from 'react'
import toRenderProps from 'recompose/toRenderProps'
import withState from 'recompose/withState'
import { Link } from 'react-router-dom'
import {compose} from 'react-apollo'
// Materia UI
import { withStyles } from '@material-ui/core/styles'
import Button from '@material-ui/core/Button'
import Menu from '@material-ui/core/Menu'
import MenuItem from '@material-ui/core/MenuItem'
// Images
import GithubLogo from '../img/github-head-negative.png'
import EmailIcon from '../img/email.png'
import ProfileIcon from '@material-ui/icons/Person'
import LogoutIcon from '@material-ui/icons/DirectionsWalk'
const UserLink = props =>
const LogoutLink = props =>
const WithState = toRenderProps(withState('anchorEl', 'updateAnchorEl', null))
const styles = {
img: {
margin: 20,
display: 'block',
maxWidth: 15,
maxHeight: 15
}
}
class LoggedInUserMenu extends Component {
constructor (props) {
super(props)
this.state = {
user: {}
}
}
displayIdentityProvider () {
const { classes } = this.props
switch (this.props.identityProvider) {
case 'github':
return (
)
break
case 'auth0':
return (
)
break
default:
}
}
render () {
const { classes } = this.props
return (
{({ anchorEl, updateAnchorEl }) => {
const open = Boolean(anchorEl)
const handleClose = () => {
updateAnchorEl(null)
}
return (
)
}}
)
}
}
export default compose(
withStyles(styles)
)(LoggedInUserMenu)