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