Merge pull request #17 from Safelite/feature/dynamic-routing

Added back <router-view></router-view>
This commit is contained in:
Frank Rua 2021-10-20 20:38:12 -04:00 committed by GitHub
commit c878bfbe07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -1,4 +1,5 @@
<template>
<router-view></router-view>
<div class="container-fluid">
<div class="row">
<div class="col my-3 d-flex justify-content-center">

View file

@ -35,7 +35,7 @@ async function GoToDynamicRoute(to, next) {
let routeData = await getRouteData(to.path).catch((exp) => {
console.log(exp);
next({ name: "NotFound" });
next({ name: "NotFound" }); // Go to 404.
});
// Add our dynamic route.
@ -47,7 +47,7 @@ async function GoToDynamicRoute(to, next) {
next(to.fullPath);
} else {
next();
next(); // Home (/) and NotFound (/not-found) will always resolve.
}
}