text: /* eslint-disable react/jsx-filename-extension */
  /* eslint-disable prettier/prettier */
  import React, { useState, useRef } from 'react';
  import styled from 'styled-components';
  import { Link } from 'react-router-dom';
  import menuIcon from './img/MenuIcon.png';
  
  const MenuContainer = styled.div`
    box-sizing: border-box;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
    margin: 20px;
    background-size: 70%;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
  `;
  const MenuList = styled.div`
    width: 200px;
    border: 2px solid black;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    margin: -100px 0px 0px -195px;
    background: white;
  `;
  const MenuItem = styled(Link)`
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    border-top: 1px solid black;
    cursor: pointer;
    :first-child {
      border-top: 0;
    }
    cursor: pointer;
    color: black;
    text-decoration: none;
  `;
  
  export default function Menu() {
    const menuList = ['User', 'Auth', 'Home'];
    const [show, setShow] = useState('none');
    const showOnClick = () => {
      return show === 'none' ? setShow('block') : setShow('none');
    };
    return (
      <MenuContainer
        style={{ backgroundImage: `url(${menuIcon})` }}
        onMouseOver={() => setShow('block')}
        onMouseOut={() => setShow('none')}
      >
        <MenuList style={{ display: show }}>
          {menuList.map((item) => (
            <MenuItem key={item} to={item}>
              {item === 'Auth' ? 'User Add' : item}
            </MenuItem>
          ))}
        </MenuList>
      </MenuContainer>
    );
  }
  