Fix some stuff
All checks were successful
continuous-integration/drone/push Build is passing

- Error page now displaying (+ removed globe, more space between content and footer)
- Manipulate data if existing
This commit is contained in:
2020-04-14 22:23:01 +02:00
parent 2ef3ad838c
commit aeb4196918
4 changed files with 28 additions and 17 deletions

View File

@@ -1,19 +1,23 @@
<script>
import { site } from 'utils/store'
import { onMount } from 'svelte'
import { site, pageReady } from 'utils/store'
// Components
import IconArrow from 'atoms/IconArrow'
import TitleSite from 'atoms/TitleSite'
import Button from 'atoms/Button'
import InteractiveGlobe from 'molecules/InteractiveGlobe'
import Footer from 'organisms/Footer'
// Props
export let status
export let error
onMount(() => {
pageReady.set(true)
})
</script>
<svelte:head>
<title>{$site.seo_name} - {error.message}</title>
<title>Houses Of - {error.message}</title>
</svelte:head>
{#if process.env.NODE_ENV === 'development' && error.stack}
@@ -35,10 +39,8 @@
<div class="page__description style-description">
<p>Oh no… Looks like something wrong just happened. Like a nasty error {status}.</p>
<Button href="/" class="button" text="Go back to the homepage" on:click={() => window.location.href = '/'} />
<Button href="/" class="button" text="Go back to homepage" />
</div>
<InteractiveGlobe type="part" />
</div>
<Footer />

View File

@@ -83,6 +83,7 @@
/*
** Manipulate data
*/
if ($countries) {
// Replace each countrie's continent by the database
$countries.forEach(count => count.continent = $continents.find(cont => cont.id === count.continent.id))
@@ -94,9 +95,12 @@
continent.countries.push(country)
}
})
}
// Replace each location's country by the database
if ($locations) {
$locations.forEach(loc => loc.country = $countries.find(cont => cont.id === loc.country.id))
}
onMount(async () => {

View File

@@ -1,5 +1,9 @@
.page {
overflow-x: hidden;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
// Page part
&__part {

View File

@@ -22,6 +22,7 @@
========================================================================== */
// Wrap (global)
.wrap {
width: 100%;
max-width: 1648px;
margin: 0 auto;
padding: 0 16px;