import React from 'react'; import { Button } from 'antd'; import { useNavigate } from 'react-router'; import { LeftOutlined, ArrowLeftOutlined } from '@ant-design/icons'; function BackButton({ compact }: { compact?: boolean }) { const navigate = useNavigate() const siteId = location.pathname.split('/')[1]; const handleBackClick = () => { navigate(`/${siteId}/dashboard`); }; if (compact) { return ( ); } export default BackButton;