diff --git a/src/app/portfolio/[slug]/(portfolio)/settings/PortfolioSettings.tsx b/src/app/portfolio/[slug]/(portfolio)/settings/PortfolioSettings.tsx index 8f17fc2d..658cd293 100644 --- a/src/app/portfolio/[slug]/(portfolio)/settings/PortfolioSettings.tsx +++ b/src/app/portfolio/[slug]/(portfolio)/settings/PortfolioSettings.tsx @@ -243,18 +243,28 @@ export default function PortfolioSettings({ // The onClick function called to update the GOAL in the DB - function handleGoalUpdateDb() { - // apiGoalChangeFunction(portfolioSettingsData.goal) - // Update portfolioGoal - router.refresh(); + function handleGoalUpdate() { + mutate({ + userId, + portfolioId, + name: null, + budget: null, + goal: portfolioGoal, + status: null, + }); } // The onClick function called to update the BUDGET in the DB - function handleStatusUpdateDb() { - // apiStatusChangeFunction(portfolioSettingsData.status) - // Update portfolioStatus - router.refresh(); + function handleStatusUpdate() { + mutate({ + userId, + portfolioId, + name: null, + budget: null, + goal: null, + status: portfolioStatus, + }); } // HTML to render the page @@ -311,7 +321,7 @@ export default function PortfolioSettings({ setOption={setPortfolioGoal} /> - @@ -326,15 +336,10 @@ export default function PortfolioSettings({ setOption={setPortfolioStatus} /> - -
Portfolio Name: {portfolioName}
-
Portfolio Budget: {portfolioBudget}
-
Goal value: {portfolioGoal}
-
Status value: {portfolioStatus}
- {/* Row 5: Delete */}