-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
141 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -532,4 +532,4 @@ export const deleteUserAccount = async (req, res, next) => { | |
} catch (error) { | ||
return next(error) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,47 @@ | ||
import React from 'react'; | ||
import React from 'react' | ||
|
||
const ConfirmationModalDelete = ({ isOpen, onClose, onConfirm, confirmationText, setConfirmationText }) => { | ||
if (!isOpen) return null; | ||
const ConfirmationModalDelete = ({ | ||
isOpen, | ||
onClose, | ||
onConfirm, | ||
confirmationText, | ||
setConfirmationText, | ||
}) => { | ||
if (!isOpen) return null | ||
|
||
return ( | ||
<div className="fixed inset-0 bg-gray-800 bg-opacity-50 flex justify-center items-center z-50"> | ||
<div className="bg-white p-6 rounded shadow-md w-1/3"> | ||
<h2 className="text-xl font-semibold mb-4">Confirm Account Deletion</h2> | ||
<p>Type <strong>"I want to delete my account"</strong> to confirm:</p> | ||
<h2 className="text-xl font-semibold mb-4"> | ||
Confirm Account Deletion | ||
</h2> | ||
<p> | ||
Type <strong>"I want to delete my account"</strong> to | ||
Check failure on line 19 in frontend/src/Components/ConfirmationModalDelete.jsx GitHub Actions / ESLint Report Analysisfrontend/src/Components/ConfirmationModalDelete.jsx#L19
Check failure on line 19 in frontend/src/Components/ConfirmationModalDelete.jsx GitHub Actions / ESLint Report Analysisfrontend/src/Components/ConfirmationModalDelete.jsx#L19
|
||
confirm: | ||
</p> | ||
<input | ||
type="text" | ||
value={confirmationText} | ||
onChange={(e) => setConfirmationText(e.target.value)} | ||
className="border border-gray-300 p-2 rounded mb-4 w-full" | ||
/> | ||
<div className="flex justify-end"> | ||
<button onClick={onClose} className="mr-2 bg-gray-300 text-gray-700 font-bold py-1 px-3 rounded"> | ||
<button | ||
onClick={onClose} | ||
className="mr-2 bg-gray-300 text-gray-700 font-bold py-1 px-3 rounded" | ||
> | ||
Cancel | ||
</button> | ||
<button onClick={onConfirm} className="bg-red-600 text-white font-bold py-1 px-3 rounded"> | ||
<button | ||
onClick={onConfirm} | ||
className="bg-red-600 text-white font-bold py-1 px-3 rounded" | ||
> | ||
Confirm | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
) | ||
} | ||
|
||
export default ConfirmationModalDelete; | ||
export default ConfirmationModalDelete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.