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

Redirected 404 Button to stay on the original tab. #730

Merged
merged 3 commits into from
Nov 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion src/lib/components/button/button.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<script lang="ts">
export let link = '#';
export let redirect = "_blank";
export let text = 'Submit';
</script>

<a class="brand-header size-md" role="button" href={link} target="_blank" rel="noopener norefferer">
<a class="brand-header size-md" role="button" href={link} target={redirect} rel="noopener norefferer">
{text}
</a>

Expand Down
2 changes: 1 addition & 1 deletion src/routes/+error.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section title={$page.error?.message}>
<em>404</em>
<h1>Frank can't find where you're going!</h1>
<Button text={'Return to Home'} link={'/'} />
<Button text={'Return to Home'} link={'/'} redirect={'_self'} />
jaasonw marked this conversation as resolved.
Show resolved Hide resolved
<img src="/assets/png/lost-frank.png" alt="404 - Page Not Found" />
</section>

Expand Down