From afb087408c59086963cb9f30e3942307ce4b8157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Wed, 26 Feb 2020 15:49:56 +0100 Subject: [PATCH] Optimize components - Use class attribute over className - Code cleaning --- src/atoms/Button.svelte | 5 +- src/atoms/IconArrow.svelte | 3 +- src/atoms/IconCross.svelte | 3 +- src/molecules/InteractiveGlobe.svelte | 5 +- src/molecules/Switcher.svelte | 2 +- src/organisms/Carousel.svelte | 10 ++-- src/routes/choose.svelte | 4 +- .../[country]/[location]/[photo].svelte | 58 +------------------ 8 files changed, 18 insertions(+), 72 deletions(-) diff --git a/src/atoms/Button.svelte b/src/atoms/Button.svelte index 76ee32b..8507b47 100644 --- a/src/atoms/Button.svelte +++ b/src/atoms/Button.svelte @@ -1,20 +1,19 @@ {#if type === 'button'} - {:else} - + {text} diff --git a/src/atoms/IconArrow.svelte b/src/atoms/IconArrow.svelte index a1f22f7..8dd7230 100644 --- a/src/atoms/IconArrow.svelte +++ b/src/atoms/IconArrow.svelte @@ -1,11 +1,10 @@ - + {#if direction === 'left'} {:else if direction === 'right'} diff --git a/src/atoms/IconCross.svelte b/src/atoms/IconCross.svelte index 9bd1c11..0dede91 100644 --- a/src/atoms/IconCross.svelte +++ b/src/atoms/IconCross.svelte @@ -1,10 +1,9 @@ - + diff --git a/src/molecules/InteractiveGlobe.svelte b/src/molecules/InteractiveGlobe.svelte index 1e13eb4..803ab5c 100644 --- a/src/molecules/InteractiveGlobe.svelte +++ b/src/molecules/InteractiveGlobe.svelte @@ -1,6 +1,7 @@
diff --git a/src/molecules/Switcher.svelte b/src/molecules/Switcher.svelte index c003dac..f7b6538 100644 --- a/src/molecules/Switcher.svelte +++ b/src/molecules/Switcher.svelte @@ -15,7 +15,7 @@ $: { location = $currentLocation - locationName = location ? location.location.name : 'World' + locationName = location ? location.name : 'World' locationOf = location ? 'Of' : 'Of The' } diff --git a/src/organisms/Carousel.svelte b/src/organisms/Carousel.svelte index 0ebc464..920a1ee 100644 --- a/src/organisms/Carousel.svelte +++ b/src/organisms/Carousel.svelte @@ -138,15 +138,15 @@ @@ -171,7 +171,7 @@ diff --git a/src/routes/choose.svelte b/src/routes/choose.svelte index c9fa3fa..40d7630 100644 --- a/src/routes/choose.svelte +++ b/src/routes/choose.svelte @@ -38,8 +38,8 @@
- -
diff --git a/src/routes/viewer/[country]/[location]/[photo].svelte b/src/routes/viewer/[country]/[location]/[photo].svelte index e04ceea..d86a56e 100644 --- a/src/routes/viewer/[country]/[location]/[photo].svelte +++ b/src/routes/viewer/[country]/[location]/[photo].svelte @@ -96,69 +96,17 @@
- - -