adding latest
This commit is contained in:
28
src/views/Home.vue
Normal file
28
src/views/Home.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>Hello {{ this.currentUser }}</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
export default {
|
||||
async mounted() {
|
||||
await this.$store.dispatch("fetchUser");
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({ currentUser: "userEmail" })
|
||||
},
|
||||
methods: {
|
||||
getUser() {
|
||||
try {
|
||||
return this.$store.getters.userEmail;
|
||||
} catch (TypeError) {
|
||||
// pass}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Reference in New Issue
Block a user