From 8840f629098fa64610a1a3c5c7b79f516e777bbd Mon Sep 17 00:00:00 2001 From: Jay kumar Vishwakarma <154872807+jaykumarvishwakarma@users.noreply.github.com> Date: Fri, 13 Mar 2026 17:50:51 +0530 Subject: [PATCH] Add icon state management in GoalManager Added icon state and updated goal object to support icons in GoalManager component. --- src/ui/features/goalmanager/GoalManager.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ui/features/goalmanager/GoalManager.tsx b/src/ui/features/goalmanager/GoalManager.tsx index 0779dda..6180015 100644 --- a/src/ui/features/goalmanager/GoalManager.tsx +++ b/src/ui/features/goalmanager/GoalManager.tsx @@ -21,11 +21,13 @@ export function GoalManager(props: Props) { const [name, setName] = useState(null) const [targetDate, setTargetDate] = useState(null) const [targetAmount, setTargetAmount] = useState(null) + const [icon, setIcon] = useState(null) useEffect(() => { setName(props.goal.name) setTargetDate(props.goal.targetDate) setTargetAmount(props.goal.targetAmount) + setIcon(props.goal.icon) }, [ props.goal.id, props.goal.name, @@ -42,6 +44,7 @@ export function GoalManager(props: Props) { setName(nextName) const updatedGoal: Goal = { ...props.goal, + icon: icon ?? props.goal.icon, name: nextName, } dispatch(updateGoalRedux(updatedGoal))