Skip to content

Commit 90df48b

Browse files
committed
404 page if route not found
1 parent a58aeb0 commit 90df48b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

frontend/src/router/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import User from '../components/app/users/User.vue';
1616
import History from '../views/app/History.vue';
1717
import Matches from '../views/app/Matches.vue';
1818
import SignOut from '../views/auth/SignOut.vue';
19+
import NotFound from '../views/NotFound.vue';
1920
import store from '../store/index';
2021

2122
Vue.use(VueRouter);
@@ -144,6 +145,11 @@ const routes = [
144145
name: 'SignOut',
145146
beforeEnter: notLoggedInRedirectLogin,
146147
},
148+
{
149+
path: '*',
150+
component: NotFound,
151+
name: 'NotFound',
152+
},
147153
];
148154

149155
const router = new VueRouter({

frontend/src/views/NotFound.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<template>
2+
<div class="sm:mx-16 lg:mx-32 mt-32">
3+
<h1 class="text-2xl text-center mx-auto">404 page not found</h1>
4+
</div>
5+
</template>

0 commit comments

Comments
 (0)