Use page transition component to avoid repetition on main

This commit is contained in:
2021-11-30 00:23:36 +01:00
parent ba09c2af2d
commit f8fe141505
9 changed files with 28 additions and 44 deletions

View File

@@ -8,6 +8,7 @@
import '$utils/polyfills'
// Components
import SVGSprite from '$components/SVGSprite.svelte'
import PageTransition from '$components/PageTransition.svelte'
import Switcher from '$components/molecules/Switcher.svelte'
import Footer from '$components/organisms/Footer.svelte'
@@ -47,7 +48,7 @@
if (!$page.query.get('country') && !$page.path.includes('/shop/poster')) {
scrollToTop()
}
}, DURATION.PAGE_OUT * 1.5)
}, DURATION.PAGE_OUT + 1)
}
})
@@ -59,7 +60,9 @@
<Switcher isOver={!!$page.params.location && !!$page.params.photo} />
<slot />
<PageTransition refresh={$page.path}>
<slot />
</PageTransition>
{#if !$page.params.photo}
<Footer />