Skip to content

Commit

Permalink
doc(README): update streak related.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZL-Asica committed Nov 5, 2024
1 parent dd412c0 commit bdff722
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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");
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit bdff722

Please sign in to comment.