fixed issue with handleDeleteConfirmation to allow the page to compile

This commit is contained in:
StefanWout 2024-10-18 15:48:12 +01:00
parent 36ec9a8df2
commit b2b8216084

View file

@ -94,17 +94,15 @@ export default function PortfolioSettings({
function handleDeleteConfirmation() {
console.log("we be deletin stuff")
if (deleteConfirmationByName === portfolioName) {
//API call to delete portfolio
//deletePortfolio(portfolioId)
// if (deleteConfirmationByName === portfolioName) {
// //apiDeletePortfolio(portfolioId)
// router.refresh();
// setIsDeleteModalOpen(false);
// } else {
// // Error if the names don't match
// console.log("Portfolio name does not match");
// }
router.refresh();
setIsDeleteModalOpen(false);
} else {
// Error if the names don't match
console.log("Portfolio name does not match");
}
}
}
// RENAMING FUNCTIONS
@ -118,8 +116,7 @@ export default function PortfolioSettings({
// The onClick function called to update the NAME in the DB
function handleRenameDb() {
// API call to rename the portfolio
// apiFunction(portfolioSettingsData.name)
// apiRanameFunction(portfolioSettingsData.name)
// Update portfolioName
router.refresh();
}
@ -135,8 +132,7 @@ export default function PortfolioSettings({
// The onClick function called to update the BUDGET in the DB
function handleBudgetUpdateDb() {
// API call to change the budget
// apiFunction(portfolioSettingsData.budget)
// apiBudgetChangeFunction(portfolioSettingsData.budget)
// Update portfolioBudget
router.refresh();
}
@ -146,8 +142,7 @@ export default function PortfolioSettings({
// The onClick function called to update the GOAL in the DB
function handleGoalUpdateDb() {
// API call to change the goal
// apiFunction(portfolioSettingsData.goal)
// apiGoalChangeFunction(portfolioSettingsData.goal)
// Update portfolioGoal
router.refresh();
}
@ -155,8 +150,7 @@ export default function PortfolioSettings({
// The onClick function called to update the BUDGET in the DB
function handleStatusUpdateDb() {
// API call to change the status
// apiFunction(portfolioSettingsData.status)
// apiStatusChangeFunction(portfolioSettingsData.status)
// Update portfolioStatus
router.refresh();
}
@ -259,3 +253,4 @@ export default function PortfolioSettings({
);
}