Rework API calls and each loops

This commit is contained in:
2020-03-16 12:57:53 +01:00
parent ba5d1de780
commit 9965c9dec3
6 changed files with 36 additions and 17 deletions

View File

@@ -98,7 +98,9 @@
*/
onMount(() => {
// Entering transition
animateIn(scope)
if (photos.length) {
animateIn(scope)
}
// Hover function
hover = event => {
@@ -129,6 +131,7 @@
<svelte:window on:keydown={keyboardNav} />
{#if photos.length}
<div class="carousel"
on:touchstart={swipeStart}
on:touchend={swipeEnd}
@@ -208,3 +211,4 @@
{/each}
</ol>
</div>
{/if}