<template>
  <div>
    <AdminNavbar />
    <v-app>
      <Nuxt />
    </v-app>
  </div>
</template>

<script>
export default {
  layout: "admin",

  created() {
    const auth = this.$store.state.auth;
    
    if (!auth.loggedIn) {
      this.$router.push("/user/authorization");
    } else if (auth.user && !auth.user.is_allow_acess_to_admin_page) {
      this.$router.push("/");
    }
  },
};
</script>

<style>
</style>
