)
}
// Filter out tasks that have goal dependencies that don't match the user's goals
const tasksFiltered = tasks.filter((task) => {
// If no goals, show the task
if (!task?.goals?.length) return true
// Check if task.goals intersect with pluginBasedGoals
return task?.goals?.some((goal) => pluginBasedGoals.includes(goal))
})
const remainingTasks = tasksFiltered?.reduce(
(count, task) => count - Number(isCompleted(task.slug)),
tasksFiltered.length,
)
return (