import { cn } from '@/lib/utils'; import { t } from 'i18next'; import { ArrowBigLeft } from 'lucide-react'; import React from 'react'; import { useNavigate } from 'umi'; import { Button } from '../ui/button'; interface BackButtonProps extends React.ButtonHTMLAttributes { to?: string; } const BackButton: React.FC = ({ to, className, children, ...props }) => { const navigate = useNavigate(); const handleClick = () => { if (to) { navigate(to); } else { navigate(-1); } }; return ( ); }; export default BackButton;