import { useState } from "react";
import HomePageTemplate from "../templates/HomePageTemplate";
import { useTranslation } from "react-i18next";

const HomePage = () => {
	const [counter, setCounter] = useState(0);
	const { t } = useTranslation();

	return (
		<HomePageTemplate
			buttonLabel={t("homePage.click_me", "Click me!!!")}
			buttonOnClick={() => {
				if (counter >= 10) {
					setCounter(0);
					return;
				} else setCounter(counter + 1);
			}}
			value={counter}
		/>
	);
};

export default HomePage;
