We're now at a stage where we can finalize the URLs for our shop - including creating the redirects and Checkout links. Referring back to Chapter 8, Introducing Vue-Router and Loading URL-Based Components, we can see which ones we are missing. These are:
- /category -redirect to /
- /product - redirect to /
- /basket - load OrderBasket component
- /checkout- load OrderCheckout component
- /complete- load OrderConfirmation component
Create the redirects in the appropriate places within the routes array. At the bottom of the routes array, create three new routes for the Order components:
routes: [
{
path: '/',
name: 'Home',
...
},
{
path: '/category',
redirect: {name: 'Home'}
},
{
path: '/category/:slug',
name: 'Category',
...
},
{
path: '/product&apos...