2023-11-27 13:15:15 -05:00
|
|
|
import AbstractView from "./AbstractView.js";
|
|
|
|
import { client, navigateTo } from "../index.js";
|
|
|
|
|
|
|
|
export default class extends AbstractView {
|
|
|
|
constructor(params) {
|
|
|
|
super(params);
|
2023-11-29 10:05:49 -05:00
|
|
|
this.setTitle("Home");
|
2023-11-27 13:15:15 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
async getHtml() {
|
2023-11-29 10:05:49 -05:00
|
|
|
if (await client.isAuthentificate() === false)
|
|
|
|
{
|
|
|
|
navigateTo("/login");
|
|
|
|
return;
|
|
|
|
}
|
2023-11-27 13:15:15 -05:00
|
|
|
return `
|
|
|
|
<h1>HOME</h1>
|
2023-11-29 10:05:49 -05:00
|
|
|
<a href="/logout" class="nav__link" data-link>Logout</a>
|
2023-11-27 13:15:15 -05:00
|
|
|
`;
|
|
|
|
}
|
|
|
|
}
|