21 lines
488 B
JavaScript
21 lines
488 B
JavaScript
import AbstractView from "./AbstractView.js";
|
|
import { client, navigateTo } from "../index.js";
|
|
|
|
export default class extends AbstractView {
|
|
constructor(params) {
|
|
super(params);
|
|
this.setTitle("Home");
|
|
}
|
|
|
|
async getHtml() {
|
|
if (await client.isAuthentificate() === false)
|
|
{
|
|
navigateTo("/login");
|
|
return;
|
|
}
|
|
return `
|
|
<h1>HOME</h1>
|
|
<a href="/logout" class="nav__link" data-link>Logout</a>
|
|
`;
|
|
}
|
|
} |