From bdff722902b6bba46f560f40c6ef7e72d20d0bcf Mon Sep 17 00:00:00 2001 From: ZL Asica <40444637+ZL-Asica@users.noreply.github.com> Date: Tue, 5 Nov 2024 11:02:48 -0600 Subject: [PATCH] doc(README): update streak related. --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b807c99..825d673 100644 --- a/README.md +++ b/README.md @@ -109,10 +109,11 @@ The `updateProfile` function accepts an object with updated user fields and sync The `useGoalsUpdater` custom hook provides functions to manage user goals, microgoals, and tasks by: -1. updating the user's profile goals by adding/deleting items (goal, microgoal, task), -2. deleting items (goal, microgoal, task), -3. toggling completion status for tasks, and -4. expanding or collapsing goals and microgoals. +1. updating the user's profile, including both goals and (optionally) the streak, +2. adding items (goal, microgoal, task), +3. deleting items (goal, microgoal, task), +4. toggling completion status for tasks with streak updates, and +5. expanding or collapsing goals and microgoals. This hook enables efficient management of goal-related actions across components, reducing repetitive code and ensuring consistent updates. @@ -124,7 +125,7 @@ This hook enables efficient management of goal-related actions across components #### Adding items -- **addGoal**: Adds a new goal with an optional name. +- **addGoal**: Adds a new goal with a specified name. ```jsx addGoal("New Goal Name"); @@ -164,7 +165,7 @@ deleteTask(goalIndex, microGoalIndex, taskIndex); #### Toggle Task Completion -- **toggleTaskCompletion**: Toggles the completion status of a task. +- **toggleTaskCompletion**: Toggles the completion status of a task and updates the streak accordingly. ```jsx toggleTaskCompletion(goalIndex, microGoalIndex, taskIndex);