Skip to content

Commit

Permalink
Merge pull request s1lvax#21 from s1lvax/feature/user-not-found-error
Browse files Browse the repository at this point in the history
Add error page for user not found / fix s1lvax#17
  • Loading branch information
s1lvax authored Oct 12, 2024
2 parents 383ea65 + 7840856 commit 1f88356
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/lib/components/UserNotFoundError.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script lang="ts">
import * as Card from '$lib/components/ui/card';
</script>

<div class="flex min-h-screen items-center justify-center p-6">
<div class="flex flex-col items-center space-y-4">
<img src="https://http.cat/404.jpg" alt="404 cat" class="w-full max-w-xs" />
<Card.Root class="w-full max-w-lg">
<Card.Header class="pb-2">
<Card.Title class="text-4xl font-bold">User Not Found 🤓</Card.Title>
</Card.Header>
<Card.Content>
<p class="text-sm text-muted-foreground">
The user you are looking for does not exist. But hey, don’t feel left out!
<span class="font-semibold">Is this you?</span>
<a href="/signup" class="text-blue-600 hover:underline"> Create your account here! </a>
</p>
<p class="mt-4 text-sm text-muted-foreground">
Or, you know, keep doing whatever you were doing when you stumbled upon this page. 🤷‍♂️
</p>
</Card.Content>
</Card.Root>
</div>
</div>
5 changes: 5 additions & 0 deletions src/routes/[username]/+error.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script lang="ts">
import UserNotFoundError from '$lib/components/UserNotFoundError.svelte';
</script>

<UserNotFoundError />

0 comments on commit 1f88356

Please sign in to comment.