summaryrefslogtreecommitdiff
path: root/src/components/navigation/LogoutButton.js
blob: 800a3da8881539c65461bab8f910e1145b27cc45 (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;