diff options
| author | Adam Soltys <[email protected]> | 2023-12-06 20:33:45 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-12-06 20:33:45 -0800 |
| commit | 6b3ff247e4125941a611369ed9bb74a2ffca57d8 (patch) | |
| tree | 91da939350398188834e5e002bc78011a2a8e5bf /src/components/About.svelte | |
| parent | bb59ac3e4e7fcbf7f8a48820eab0ee21558183fc (diff) | |
| parent | d69c34cf389639eac82d24d1f1b02f038ef42399 (diff) | |
| download | coinos-ui-6b3ff247e4125941a611369ed9bb74a2ffca57d8.tar.gz coinos-ui-6b3ff247e4125941a611369ed9bb74a2ffca57d8.zip | |
Merge branch 'master' into swapee
Diffstat (limited to 'src/components/About.svelte')
| -rw-r--r-- | src/components/About.svelte | 62 |
1 files changed, 42 insertions, 20 deletions
diff --git a/src/components/About.svelte b/src/components/About.svelte index ee756afb..62a46bda 100644 --- a/src/components/About.svelte +++ b/src/components/About.svelte @@ -1,27 +1,49 @@ <script> - export let locations; + import { onMount } from "svelte"; + import Icon from "$comp/Icon.svelte"; + import Image from "$comp/Image.svelte"; + import LocationsMap from "$comp/LocationsMap.svelte"; + import { t } from "$lib/translations"; - import { Image, Icon, LocationsMap } from '$comp'; - import { t } from '$lib/translations'; + let team = [ + { + name: "adam", + socials: [ + { + type: "twitter", + url: "https://twitter.com/adamsoltys", + color: "bg-[#1D9BF0]", + }, + { + type: "github", + url: "https://github.com/asoltys", + color: "bg-gray-800", + }, + ], + }, + { name: "cole", socials: [] }, + ]; - let team = [ - { - name: 'adam', - socials: [ - { type: 'twitter', url: 'https://twitter.com/adamsoltys', color: 'bg-[#1D9BF0]' }, - { type: 'github', url: 'https://github.com/asoltys', color: 'bg-gray-800' } - ] - }, - { name: 'cole', socials: [] } - ]; + let locations; + onMount(async () => { + try { + ({ locations } = await fetch("/locations").then((r) => r.json())); + } catch (e) { + console.log(e); + } + }); </script> {#if locations?.length} - <div> - <h3 class="text-5xl font-medium mb-5 text-center">{$t('about.locations.header')}</h3> - <p class="text-secondary text-xl w-full md:w-10/12 lg:w-2/3 2xl:w-[800px] mx-auto mb-10"> - {@html $t('about.locations.description')} - </p> - <LocationsMap {locations} /> - </div> + <div> + <h3 class="text-5xl font-medium mb-5 text-center"> + {$t("about.locations.header")} + </h3> + <p + class="text-secondary text-xl w-full md:w-10/12 lg:w-2/3 2xl:w-[800px] mx-auto mb-10" + > + {@html $t("about.locations.description")} + </p> + <LocationsMap {locations} /> + </div> {/if} |
