Skip to content

Commit

Permalink
feat: 404 Fallback when jobs not found
Browse files Browse the repository at this point in the history
  • Loading branch information
shivarm committed Sep 18, 2024
1 parent 22fae7d commit b719c33
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
34 changes: 34 additions & 0 deletions app/error.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<script setup lang="ts">
import type { NuxtError } from '#app';
import { Icon } from '@iconify/vue';
const props = defineProps({
error: Object as () => NuxtError,
});
const handleError = () => clearError({ redirect: '/' });
</script>

<template>
<div class="w-full bg-gradient-to-b from-white from-65% via-zinc-100 via-80% to-zinc-800 to-100%">
<div class="w-full md:w-1/2 mx-auto">
<div class="min-h-[100vh] h-full flex flex-col items-center">
<div class="max-w-md mx-auto w-full flex flex-col justify-center items-center">
<div><img src="/vidur-logo.svg" class="h-6 px-4 sm:px-6 lg:px-8 my-8" /></div>
<div class="flex flex-col items-center justify-center text-center text-xl space-y-4">
<Icon icon="mingcute:terror-fill" class="text-7xl text-zinc-800" />
<div class="text-9xl text-zinc-800 font-noto text-center font-medium">{{ error?.statusCode }}</div>
</div>
<div class="my-3 font-semibold text-lg text-zinc-800 mb-1 font-noto">Error: {{ error?.message }} :(</div>
<NuxtLink
class="btn bg-zinc-900 text-zinc-100 hover:bg-zinc-800 my-3 p-2 rounded-lg"
to="/"
@click="handleError"
>
Go To Home</NuxtLink
>
</div>
</div>
</div>
</div>
</template>
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
},
"devDependencies": {
"@types/pg": "^8.11.10",
"@iconify/vue": "^4.1.2",
"changelogen": "^0.5.5",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@
resolved "https://registry.yarnpkg.com/@iconify/types/-/types-2.0.0.tgz#ab0e9ea681d6c8a1214f30cd741fe3a20cc57f57"
integrity sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==

"@iconify/vue@^4.1.1":
"@iconify/vue@^4.1.1", "@iconify/vue@^4.1.2":
version "4.1.2"
resolved "https://registry.yarnpkg.com/@iconify/vue/-/vue-4.1.2.tgz#b76135785ca366b29bf0736eee9cfefc1c2ef79e"
integrity sha512-CQnYqLiQD5LOAaXhBrmj1mdL2/NCJvwcC4jtW2Z8ukhThiFkLDkutarTOV2trfc9EXqUqRs0KqXOL9pZ/IyysA==
Expand Down

0 comments on commit b719c33

Please sign in to comment.