Files
housesof/src/routes/shop/+error.svelte
Félix Péault 5e5c08ddd1 🚧 Migrate to new SvelteKit routing system
A bit annoying but for the best I guess?
2022-08-16 15:54:15 +02:00

41 lines
1.2 KiB
Svelte
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script lang="ts">
import { getContext } from 'svelte'
import { page } from '$app/stores'
// Components
import Metas from '$components/Metas.svelte'
import PageTransition from '$components/PageTransition.svelte'
import ShopHeader from '$components/organisms/ShopHeader.svelte'
import PostersGrid from '$components/organisms/PostersGrid.svelte'
const { posters } = getContext('shop')
const errors = {
404: {
title: 'Product not found',
message: 'The product you are looking for does not exist… yet!',
},
500: {
title: 'Server error',
message: "That is embarassing, the problem is on our side.",
},
}
</script>
<Metas
title="{errors[$page.status].title} Houses Of"
/>
<PageTransition name="shop-page">
<ShopHeader />
<section class="shop-page__error">
<div class="container grid">
<div class="inner">
<h2 class="title-big">Uh oh!</h2>
<p class="text-medium">{errors[$page.status].message}</p>
</div>
</div>
</section>
<PostersGrid {posters} />
</PageTransition>