ft_transcendence/frontend/static/js/views/accounts/LogoutView.js
starnakin 84a5a592ca add: Abstract class to simplifie the code,
AbstractRedirectView,
AbstractAuthentificateView
AbstractUnAuthentificateView
2023-11-29 19:55:44 +01:00

12 lines
300 B
JavaScript

import { client, navigateTo } from "../../index.js";
import AbstractAuthentificateView from "../AbstractAuthentificateView.js";
export default class extends AbstractAuthentificateView
{
constructor(params) {
super(params);
this.setTitle("Logout");
client.logout();
navigateTo("/login")
}
}