-
Notifications
You must be signed in to change notification settings - Fork 24
/
index.js
32 lines (29 loc) · 891 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import TodoListItem from "../components/TodoListItem";
import AddTask from "../components/AddTask";
import { useEffect, useState } from "react";
import axios from "../utils/axios";
import { useAuth } from "../context/auth";
export default function Home() {
const { token } = useAuth();
const [tasks, setTasks] = useState([]);
function getTasks() {
/***
* @todo Fetch the tasks created by the user.
* @todo Set the tasks state and display them in the using TodoListItem component
* The user token can be accessed from the context using useAuth() from /context/auth.js
*/
}
return (
<div>
<center>
<AddTask />
<ul className="flex-col mt-9 max-w-sm mb-3 ">
<span className="inline-block bg-blue-600 py-1 mb-2 px-9 text-sm text-white font-bold rounded-full ">
Available Tasks
</span>
<TodoListItem />
</ul>
</center>
</div>
);
}