ft_transcendence/frontend/static/js/views/accounts/LogoutView.js
2023-11-29 16:05:49 +01:00

13 lines
280 B
JavaScript

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")
}
}