const parseTaskList = (tasks) => {
  var template = ``;

  tasks.forEach((task, index) => {
    template += `
    <div class="pb-1">
      <a class="sidenav-links" onclick="loadTask('${task.title}')">
         ${prependNewTag(task)} ${task.title}
      </a>
    </div>
    `;
  });

  return template;
};

const prependNewTag = (task) => {
  if (!task.seen) {
    return `<span id='new-marker-${task.title}'>NEW: </span>`;
  } else {
    return "";
  }
};
