import WebsiteDeleteForm from 'components/pages/settings/websites/WebsiteDeleteForm'; import WebsiteResetForm from 'components/pages/settings/websites/WebsiteResetForm'; import { useRouter } from 'next/router'; import { useState } from 'react'; import { Button, Form, FormRow, Modal } from 'react-basics'; export default function WebsiteReset({ websiteId, onSave }) { const [modal, setModal] = useState(null); const router = useRouter(); const handleReset = async () => { setModal(null); onSave(); }; const handleDelete = async () => { onSave(); await router.push('/websites'); }; const handleClose = () => setModal(null); return (

All statistics for this website will be deleted, but your settings will remain intact.

All website data will be deleted.

{modal === 'reset' && ( {close => } )} {modal === 'delete' && ( {close => ( )} )}
); }