import { Stack, Button } from "@mui/material"; import { useNavigate } from "react-router-dom"; import PropTypes from "prop-types"; import { useTranslation } from "react-i18next"; import { useTheme } from "@emotion/react"; const CreateMonitorHeader = ({ isAdmin, label = "Create new", isLoading = true, path, bulkPath, }) => { const navigate = useNavigate(); const { t } = useTranslation(); const theme = useTheme(); if (!isAdmin) return null; return ( {bulkPath && ( )} ); }; export default CreateMonitorHeader; CreateMonitorHeader.propTypes = { isAdmin: PropTypes.bool.isRequired, isLoading: PropTypes.bool, path: PropTypes.string.isRequired, label: PropTypes.string, bulkPath: PropTypes.string, };