summaryrefslogtreecommitdiff
path: root/frontend/src/components/navigation/LogoutButton.js
blob: 905e1ae9f17e83fe3eeb59198e10e39a151f2499 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import PropTypes from 'prop-types'
import React from 'react'
import FontAwesome from 'react-fontawesome'
import { Link } from 'react-router-dom'

const LogoutButton = ({ onLogout }) => (
    <Link className="logout nav-link" title="Sign out" to="#" onClick={onLogout}>
        <FontAwesome name="power-off" size="lg"/>
    </Link>
)

LogoutButton.propTypes = {
    onLogout: PropTypes.func.isRequired,
}

export default LogoutButton