import {
Box,
Modal,
ModalBody,
ModalCloseButton,
ModalContent,
ModalHeader,
ModalOverlay,
useColorModeValue,
useDisclosure,
} from '@chakra-ui/react';
import { VscClose } from 'react-icons/vsc';
import { useNavigate } from 'react-router-dom';
import { BtnDefault, BtnRed, SecondaryBtn } from '../utils/Buttons';
const LeavePageAlert = () => {
const { isOpen, onOpen, onClose } = useDisclosure();
const navigate = useNavigate();
return (
<>
You have unsaved changes
You've made changes to your post. Do you want to navigate to
leave this page?
navigate(-1)}>
Leave the page
Keep editing
>
);
};
export default LeavePageAlert;