import { useContext, useEffect } from "react";
import { NavLink } from "react-router-dom";
import { useLocation } from "react-router-dom";
import { LanguageContext, useLanguage } from "../hooks/useLanguage";
export default function Menu() {
	let location = useLocation();
	const { language, changeLanguage } = useLanguage();

	return (
		<nav className='main-menu'>
			<ul className='navlist'>
				<NavLink to='/'>Home</NavLink>
				<NavLink to='/select-profile'>Profile</NavLink>
				<NavLink to='/play'>Play</NavLink>
				<NavLink to='/results'>Results</NavLink>
			</ul>
			<button onClick={changeLanguage}>Change language</button>
		</nav>
	);
}
