final ref hw2 / fix logic

This commit is contained in:
neko
2022-08-29 10:20:56 +03:00
parent d50ba3f187
commit 4173af28e9

View File

@@ -22,12 +22,13 @@ const defaultAffairs: any = [ // need to fix any
// pure helper functions
export const filterAffairs = (affairs: any, filter: any): any => { // need to fix any
if (filter !== 'all') return affairs.filter((a: AffairType) => a.priority === filter)
return affairs // need to fix
}
export const deleteAffair = (affairs: any, _id: any): any => { // need to fix any
return affairs // need to fix
return affairs.filter((a: AffairType) => a._id !== _id) // need to fix
}
function HW2() {