Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 404 error route #793

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions src/pages/Error404.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
<script lang="ts">
import { DEFAULT_THEME } from 'src/config/BaseChain';
import { defineComponent } from 'vue';

export default defineComponent({
name: 'Error404Page',
setup () {
return {
secondary: DEFAULT_THEME.secondary,
};
},
});
</script>

<template>
<div class="fullscreen bg-blue text-white text-center q-pa-md flex flex-center">
<div>
<div class="text-primary text-center q-pa-md flex flex-center q-my-lg">
<div class="message-404">
<div class="text-xl">404</div>
<div class="text-h2">Oops. Nothing here...</div>
<q-btn
class="q-mt-xl"
color="white"
text-color="blue"
:text-color="secondary"
unelevated
to="/"
label="Go Home"
Expand All @@ -23,3 +29,8 @@ export default defineComponent({
</div>
</div>
</template>

<style lang="sass">
.message-404
color: var(--q-secondary)
</style>
3 changes: 2 additions & 1 deletion src/router/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ const routes: RouteRecordRaw[] = [
// but you can also remove it
{
path: '/:catchAll(.*)*',
component: () => import('pages/Error404.vue'),
component: () => import('layouts/MainLayout.vue'),
children: [{ path: '', component: () => import('pages/Error404.vue') }],
},
];

Expand Down
Loading