Skip to content

Commit

Permalink
add due dates to examples
Browse files Browse the repository at this point in the history
So the user can see how the closest to-do to expiration will
show on the main page.
  • Loading branch information
HectorVilas committed Jan 19, 2023
1 parent e7aac1b commit ce10147
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/modules/todoSample.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {Todo} from "./classes.js";
import { format } from "date-fns";
import { format, addDays } from "date-fns";

const date = format(new Date(), "yyyy-MM-dd");

export const todoSample = [
{
title: "How to use",
todos: [
new Todo("1) Creating a project", "These are the steps to create a new project", date,"", [
new Todo("1) Creating a project", "These are the steps to create a new project", date, date, [
{ task: "• Touch the burger button ", isDone: false },
{ task: "or look at the sidebar at the left", isDone: false },
{ task: "• Touch the plus button", isDone: false },
Expand Down Expand Up @@ -71,15 +71,16 @@ export const todoSample = [
{
title: "Example project",
todos: [
new Todo("exercise", "It's leg day!", date, "", [
new Todo("exercise", "It's leg day!", date, format(addDays(new Date(), 1), "yyyy-MM-dd"), [
{ task: "run 3km", isDone: true },
{ task: "bicycle", isDone: false },
{ task: "squats", isDone: false },
], "middle", false, true),

new Todo("coding", "", date, "", [
new Todo("coding", "", date, format(addDays(new Date(), 8), "yyyy-MM-dd"), [
{ task: "check css-tricks", isDone: true },
{ task: "continue TOP practice", isDone: true },
{ task: "Share practice on TOP's Discord", isDone: false },
], "high", true, false),
],
},
Expand Down

0 comments on commit ce10147

Please sign in to comment.