Skip to content

Commit

Permalink
add error page & redirect (#16)
Browse files Browse the repository at this point in the history
# Description

- added error page
- if 404, redirect home.

- Closes #15 

## Screenshot(s)


https://github.com/frequency-chain/frequency-xyz/assets/43625033/f7f36dd4-bbd9-45a6-8734-a2eae8e59eef



## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

# How to Test?

Please describe how to test that you ran to verify your changes. Provide
instructions so we can reproduce. Please also
list any relevant details for your test configuration

1. Pull and run locally
2. Go to path that does not exist
3. See that user is redirected home
4. See that on paths the do exist, everything works as expected

# Checklist:

- [x] I have performed a self-review of my code
- [x] I have commented my code & PR, particularly in hard-to-understand
areas
- [x] I have checked at all the breakpoints to make sure it works on all
screen sizes

---------

Co-authored-by: Claire Olmstead <[email protected]>
  • Loading branch information
claireolmstead and claireolmstead authored Jun 7, 2024
1 parent f33d3dc commit ec86903
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/routes/+error.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script>
import { page } from '$app/stores';
$: {
if ($page.status === 404) {
window.location.href = '/';
}
}
</script>

<div class="freq-container mt-[150px]">
<p>Error</p>
<a class="underline" href="/">Return Home</a>
</div>

0 comments on commit ec86903

Please sign in to comment.