title: Cannot read properties of undefined (reading '$store')
body: <p>Hii I'm getting this error Cannot read properties of undefined (reading '$store'):
  This is my router(index.js)</p>
  <pre><code>{
    path: '/',
    name: 'login',
    component: () =&gt; import( /* webpackChunkName: &quot;hours&quot; */ '../views/login.vue'),
    meta: {
      hideNavbar: true,
    },
    beforeEnter: (to, from, next) =&gt; {
      if (this.$store.state.authenticated.admin === true) {
        next('/home');
      } else {
        next(false);
      }
    }
  </code></pre>
  <p>In this above code I'm Struggling to navigate to the home page...getting this error.
  here`TypeError: Cannot read properties of undefined (reading '$store')</p>