Display name sync
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import routes from "../components/routes";
|
||||
|
||||
class Session {
|
||||
store(username, token) {
|
||||
localStorage.setItem("user", username);
|
||||
@@ -9,6 +11,11 @@ class Session {
|
||||
localStorage.removeItem("token");
|
||||
}
|
||||
|
||||
resetAndRedirect(url) {
|
||||
this.reset();
|
||||
window.location.href = url;
|
||||
}
|
||||
|
||||
exists() {
|
||||
return this.username() && this.token();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user