Clicking one of the category links (that is, /#/category/grips) will navigate to a blank page – thanks to our route. We need to create a template and set up the category page to show the products. As a starting base, create the CategoryPage component in a similar vein to the product page.
Create a template with an empty container and the PageNotFound component inside. Create a data variable titled categoryNotFound, and ensure the PageNotFound component displays if this is set to true. Create a props object, which allows the slug property to be passed and, lastly, create a category computed function.
The CategoryPage component should look like the following:
const CategoryPage = {
name: 'CategoryPage',
template: `<div>
<div v-if="category"></div>
<page-not-found v-if="categoryNotFound...