import React from "react";
import Menu from "../components/ui/Menu";
import { postGameStatisticsData } from "../services/WordpressFetchData";
import { useLanguage } from "../hooks/useLanguage";
import AnimatedPage from "../components/AnimatedPage";
import { useUser } from "../hooks/useUser";

export default function Results() {
	const { language, screenTranslations } = useUser();
	if (!screenTranslations) return <p>loading</p>;
	
	function addPost(language) {
		postGameStatisticsData("/statistics/post", "BE");
	}

	return (
		<AnimatedPage className='page-container page-container--test'>
			<div className='screen screen--test'>
				<Menu />
				<div id='screen-container'>
					<button onClick={() => addPost(language)}>Finish the game</button>
				</div>
			</div>
		</AnimatedPage>
	);
}
