import { FiArrowLeft } from "react-icons/fi";
import { useNavigate } from "react-router-dom";
import RoundButtonBase from "../atoms/RoundButtonBase";
import IconBase from "../molecules/IconBase";
import { useTranslation } from "react-i18next";

const HomeButton = () => {
	const { t } = useTranslation();
	const navigate = useNavigate();
	const navigateToHome = () => {
		navigate("/");
	};

	return (
		<RoundButtonBase
			buttonProps={{ onClick: navigateToHome }}
			tooltipText={t("button.navigation.home")}
		>
			<IconBase>
				<FiArrowLeft />
			</IconBase>
		</RoundButtonBase>
	);
};

export default HomeButton;
