Removed window eventhub, replaced w/ store
This commit is contained in:
@@ -6,8 +6,6 @@ import store from "./store";
|
|||||||
import Toast from "./plugins/Toast";
|
import Toast from "./plugins/Toast";
|
||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
|
|
||||||
window.eventHub = new Vue();
|
|
||||||
|
|
||||||
Vue.use(VueRouter);
|
Vue.use(VueRouter);
|
||||||
Vue.use(Toast);
|
Vue.use(Toast);
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ export default {
|
|||||||
register(username, password)
|
register(username, password)
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (data.success && this.login()) {
|
if (data.success && this.login()) {
|
||||||
eventHub.$emit("setUserStatus");
|
|
||||||
this.$router.push({ name: "profile" });
|
this.$router.push({ name: "profile" });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user