<template>
  <div><MainVote /></div>
</template>

<script>
import MainVote from "@/components/MainVote.vue";

export default {
  name: "HomePage",
  components: {
    MainVote,
  },
  mounted() {
    // this.$emitter.on("loginUser", (val) => {
    //   console.log("user", val);
    //   if (val) {
    //     this.username = localStorage.getItem("username");
    //   }
    // });
    this.username = localStorage.getItem("username");
    this.img = localStorage.getItem("img");
    if (this.getUsername == "") {
      this.$store.commit("setUsername", this.username);
    }
    if (this.getImg == ""||this.getImg == null||this.getImg == undefined) {
      this.$store.commit("setImg", this.img);
    }
  },
};
</script>

<style>
</style>
