Exercise tracking
Let’s add a new route to have our users add a routine to the database. Let’s start by adding a new route entry on the routes:
{ path: 'track', name: 'Track', component: () => import(/* webpackChunkName: "track" */ '@/views/Track.vue'), beforeEnter: loginGuard },
As you can see, this is a page that is only accessible by authenticated users. Our entry also means that we need to create a view, called Track.vue
, so let’s continue:
<script lang="ts" setup>import TrackExercise from "@/components/TrackExercise.vue"; </script> <template> <track-exercise /> </template>
We’...