style: fix valid-prop-names-in-kit-pages — use $page store instead of export let props in +error.svelte

This commit is contained in:
2026-06-25 14:36:08 +01:00
parent 7514a228d5
commit d5e93b3be2
+5 -7
View File
@@ -1,20 +1,18 @@
<script lang="ts"> <script lang="ts">
import { page } from '$app/stores';
import { Button } from '$lib/components/ui/button'; import { Button } from '$lib/components/ui/button';
export let error: Error;
export let status: number;
</script> </script>
<section class="py-20 text-center"> <section class="py-20 text-center">
<h1 class="mb-4 text-5xl font-bold">{status}</h1> <h1 class="mb-4 text-5xl font-bold">{$page.status}</h1>
<p class="mb-6 text-lg text-gray-600"> <p class="mb-6 text-lg text-gray-600">
{status === 404 {$page.status === 404
? "Oops! The page you are looking for doesn't exist." ? "Oops! The page you are looking for doesn't exist."
: 'Something went wrong. Please try again later.'} : 'Something went wrong. Please try again later.'}
</p> </p>
{#if error?.message} {#if $page.error?.message}
<p class="mb-8 text-gray-500">{error.message}</p> <p class="mb-8 text-gray-500">{$page.error.message}</p>
{/if} {/if}
<Button href="/" class="px-6 py-3 text-lg">Go Back Home</Button> <Button href="/" class="px-6 py-3 text-lg">Go Back Home</Button>