diff --git a/src/components/atoms/Button.svelte b/src/components/atoms/Button.svelte new file mode 100644 index 0000000..215464f --- /dev/null +++ b/src/components/atoms/Button.svelte @@ -0,0 +1,10 @@ + + +{#if tag === 'button'} + +{/if} \ No newline at end of file diff --git a/src/components/molecules/Location.svelte b/src/components/molecules/Location.svelte index b8c4994..614e446 100644 --- a/src/components/molecules/Location.svelte +++ b/src/components/molecules/Location.svelte @@ -1,3 +1,14 @@ \ No newline at end of file + export let location: any + + const { name, slug, country, last_updated } = location + + +
+ + Flag of {country.name} +

+ {name} +

+
+
\ No newline at end of file diff --git a/src/components/organisms/Locations.svelte b/src/components/organisms/Locations.svelte index 16fbd9d..ce365f0 100644 --- a/src/components/organisms/Locations.svelte +++ b/src/components/organisms/Locations.svelte @@ -1,9 +1,9 @@ -
@@ -13,12 +13,12 @@
- {#each locations as location (location.id)} + {#each locations as location (location.slug)} diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte index 59af724..bce8595 100644 --- a/src/routes/__layout.svelte +++ b/src/routes/__layout.svelte @@ -24,13 +24,21 @@ name slug country { - id + name + slug + flag { + id + } } + date_updated } country { name slug + flag { + id + } } continent { diff --git a/src/routes/index.svelte b/src/routes/index.svelte index 29140fa..f36c60b 100644 --- a/src/routes/index.svelte +++ b/src/routes/index.svelte @@ -5,7 +5,6 @@ import Locations from '$components/organisms/Locations.svelte' const globalData: any = getContext('global') - console.log(globalData) Hello location \ No newline at end of file