diff --git a/src/atoms/ToggleLayout.svelte b/src/atoms/ToggleLayout.svelte index bde0e4f..c85e7e8 100644 --- a/src/atoms/ToggleLayout.svelte +++ b/src/atoms/ToggleLayout.svelte @@ -35,12 +35,12 @@ case 'grid': grid.classList.add(layoutGridClass) grid.classList.remove(layoutListClass) - break; + break case 'list': grid.classList.add(layoutListClass) grid.classList.remove(layoutGridClass) - break; - default: break; + break + default: break } // Animate the active pill diff --git a/src/molecules/Location.svelte b/src/molecules/Location.svelte index bfee7f3..a51a70c 100644 --- a/src/molecules/Location.svelte +++ b/src/molecules/Location.svelte @@ -2,11 +2,13 @@ export let name export let slug export let country + + const src = country.flag.full_url
- {'Flag + {'Flag

{name}

{country.name}

diff --git a/src/organisms/Carousel.svelte b/src/organisms/Carousel.svelte index 1899a23..8c5015a 100644 --- a/src/organisms/Carousel.svelte +++ b/src/organisms/Carousel.svelte @@ -23,12 +23,17 @@ const button = event.currentTarget.querySelector('button') const photoActive = document.querySelector('.gallery .active') const photoToHover = (to === 'prev') ? photoActive.previousSibling : photoActive.nextSibling - if (event.type === 'mouseenter') { - photoToHover.classList.add('hover') - button.focus() - } else { - photoToHover.classList.remove('hover') - button.blur() + + switch (event.type) { + case 'mouseenter': + photoToHover.classList.add('hover') + button.focus() + break + case 'mouseleave': + photoToHover.classList.remove('hover') + button.blur() + break + default: break } } @@ -87,13 +92,10 @@