dispatch/client/js/components/ui/Navicon.js

20 lines
407 B
JavaScript
Raw Normal View History

import React from 'react';
2020-04-30 12:36:30 +00:00
import { FiMenu } from 'react-icons/fi';
import { useDispatch } from 'react-redux';
import Button from 'components/ui/Button';
import { toggleMenu } from 'state/ui';
2020-04-30 12:36:30 +00:00
const Navicon = () => {
const dispatch = useDispatch();
return (
<Button
className="navicon"
icon={FiMenu}
onClick={() => dispatch(toggleMenu())}
/>
);
};
export default Navicon;