Handle undefined routes
This commit is contained in:
@@ -13,12 +13,11 @@
|
|||||||
.text-block {
|
.text-block {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
/*justify-content: start;*/
|
||||||
|
|
||||||
.text-block {
|
|
||||||
justify-content: start;
|
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
|
|
||||||
@@ -27,6 +26,7 @@
|
|||||||
background: rgb(239, 239, 239);
|
background: rgb(239, 239, 239);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-width: 1501px) {
|
@media screen and (max-width: 1501px) {
|
||||||
.text-block {
|
.text-block {
|
||||||
padding: 5px 15px 5px 15px;
|
padding: 5px 15px 5px 15px;
|
||||||
|
|||||||
@@ -1,38 +1,18 @@
|
|||||||
import { createRouter, createWebHistory } from 'vue-router'
|
import { createRouter, createWebHistory } from 'vue-router'
|
||||||
import HomeView from '../views/HomeView.vue'
|
import HomeView from '../views/HomeView.vue'
|
||||||
import AboutView from '../views/AboutView.vue'
|
import AboutView from '../views/AboutView.vue'
|
||||||
import ErrorView from '../views/ErrorView.vue'
|
|
||||||
import CreateView from "../views/CreateView.vue";
|
import CreateView from "../views/CreateView.vue";
|
||||||
import JoinView from "../views/JoinView.vue";
|
import JoinView from "../views/JoinView.vue";
|
||||||
|
import ErrorView from '../views/ErrorView.vue';
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(import.meta.env.BASE_URL),
|
history: createWebHistory(import.meta.env.BASE_URL),
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{ path: '/', name: 'home', component: HomeView},
|
||||||
path: '/',
|
{ path: '/about', name: 'about', component: AboutView},
|
||||||
name: 'home',
|
{ path: '/create', name: 'create', component: CreateView},
|
||||||
component: HomeView,
|
{ path: '/join', name: 'join', component: JoinView},
|
||||||
},
|
{ path: '/:pathMatch(.*)*', component: ErrorView }
|
||||||
{
|
|
||||||
path: '/about',
|
|
||||||
name: 'about',
|
|
||||||
component: AboutView,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/error',
|
|
||||||
name: 'error',
|
|
||||||
component: ErrorView,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/create',
|
|
||||||
name: 'create',
|
|
||||||
component: CreateView,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/join',
|
|
||||||
name: 'join',
|
|
||||||
component: JoinView,
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,22 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
import TextBlock from "@/components/TextBlock.vue";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<TextBlock>
|
||||||
<h1>Oopsie</h1>
|
<h1>Oopsie</h1>
|
||||||
<p>Something went wrong</p>
|
<p>Something went wrong</p>
|
||||||
|
</TextBlock>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
|
.text-block {
|
||||||
|
border-left: solid 4px red;
|
||||||
|
width: 35%;
|
||||||
|
height: 35%;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user