<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{{ .title }}</title>
{{template "head" .}}
</head>
<body>
{{template "navbar" .}}
<div class="position-absolute top-50 start-50 translate-middle">
<div class="fs-3">{{ .title }}</div>
<hr>
</div>
{{template "scripts" .}}
<script>
userLoggedIn().then((loggedIn) => !loggedIn ? redirect("/view/login") : getAllTasks());
async function getAllTasks() {
const response = await fetch("/tasks", {method: 'GET', headers: myHeaders});
const json = await response.json();
console.log(json);
}
</script>
</body>
</html>