Skip to content

Commit

Permalink
feat : filter by priority added
Browse files Browse the repository at this point in the history
  • Loading branch information
t007rushi committed Apr 7, 2022
1 parent 3ab4337 commit 35832b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/utils/getFilterbyPriority.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export const filterbyPriority = (state, notes) => {
if (state.priorities.length !== 0) {
return notes.filter((item) =>
state.priorities.includes(item.Note.priority)
);
}
return notes;
};

0 comments on commit 35832b3

Please sign in to comment.