mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
complete the if statement determining if the portfolioName and deleteConfirmationByName match,added some error handling to the handleDeleteConfirmation function
This commit is contained in:
parent
42782a8db1
commit
36ec9a8df2
1 changed files with 11 additions and 1 deletions
|
|
@ -93,8 +93,18 @@ export default function PortfolioSettings({
|
|||
const [deleteConfirmationByName, setDeleteConfirmationByName] = useState("")
|
||||
|
||||
function handleDeleteConfirmation() {
|
||||
// if (deleteConfirmationByName === portfolioName)
|
||||
console.log("we be deletin stuff")
|
||||
if (deleteConfirmationByName === portfolioName) {
|
||||
//API call to delete portfolio
|
||||
//deletePortfolio(portfolioId)
|
||||
router.refresh();
|
||||
setIsDeleteModalOpen(false);
|
||||
} else {
|
||||
// Error if the names don't match
|
||||
console.log("Portfolio name does not match");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// RENAMING FUNCTIONS
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue