import { Button } from "@/ui";
import { t } from "i18next";
import { ChevronLeftIcon } from "lucide-react";
import { useNavigate } from "react-router-dom";

export const BackHistoryButton = () => {
  const navigate = useNavigate();

  return (
    <Button variant='outline' size='icon' className='h-7 w-7' onClick={() => navigate(-1)}>
      <ChevronLeftIcon className='w-4 h-4' />
      <span className='sr-only'>{t("common.back")}</span>
    </Button>
  );
};
