<template></template>

<script>
import { mapGetters } from "vuex";
export default {
  data() {
    return {};
  },
  computed: {
    ...mapGetters(["defaultRoutes"]),
  },
  mounted() {
    const firstRouter = this.defaultRoutes.filter(item => !item.hidden)
    if(this.$store.state.user.roles.includes('unit')) {
      this.$router.push('/'+firstRouter[0].children[0].path);
    } else {
      this.$router.push(firstRouter[0].path + "/" + firstRouter[0].children[0].path);
    }
  },
};
</script>

<style></style>