import React, { useState, useEffect } from 'react'; import { Button } from './Button'; import { Link } from 'react-router-dom'; import './Navbar.css'; function Navbar() { const [click, setClick] = useState(false); const [button, setButton] = useState(true); const handleClick = () => setClick(!click); const closeMobileMenu = () => setClick(false); const showButton = () => { if (window.innerWidth <= 960) { setButton(false); } else { setButton(true); } }; /* Shows the button after resizing the screen */ useEffect(() => { showButton(); }, []); window.addEventListener('resize', showButton); return ( <> ); } export default Navbar;