ft_transcendence/frontend/static/js/views/accounts/LogoutView.js

13 lines
280 B
JavaScript
Raw Normal View History

2023-11-29 10:05:49 -05:00
import { client, navigateTo } from "../../index.js";
import AbstractView from "../AbstractView.js";
export default class extends AbstractView
{
constructor(params) {
super(params);
this.setTitle("Logout");
if (client.logged)
client.logout();
navigateTo("/login")
}
}