Skip to content

Commit

Permalink
filter out deleted tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
0xlynett committed Sep 3, 2024
1 parent 54bbddb commit 09c1065
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function loader() {
threadId: string;
xp: number;
createdBy: string;
isActive: "0" | "1";
status: "deleted" | "1";
createdTimestamp: string | number;
endTimestamp: string | number;
}[] = await t.json();
Expand Down Expand Up @@ -53,8 +53,9 @@ export async function loader() {
}
);

console.log(tasks);
const finalizedTasks: Task[] = tasks
.filter((v) => v.isActive != "1")
.filter((v) => v.status != "deleted")
.map(({ createdBy, description, name, id, threadId, xp, endTimestamp }) => {
return {
name,
Expand Down

0 comments on commit 09c1065

Please sign in to comment.