Add US map component to world travel page
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { createEventDispatcher } from "svelte";
|
||||||
|
const dispatch = createEventDispatcher();
|
||||||
function handleStateClick(stateCode: String) {
|
function handleStateClick(stateCode: String) {
|
||||||
console.log(`Clicked on ${stateCode}`);
|
console.log(`Clicked on ${stateCode}`);
|
||||||
|
dispatch("marked", stateCode);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -12,6 +15,7 @@
|
|||||||
version="1.1"
|
version="1.1"
|
||||||
width="1200"
|
width="1200"
|
||||||
height="600"
|
height="600"
|
||||||
|
fill="#ffffff"
|
||||||
>
|
>
|
||||||
<defs id="defs282" />
|
<defs id="defs282" />
|
||||||
<g id="viewport">
|
<g id="viewport">
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import { getFlag } from "$lib";
|
import { getFlag } from "$lib";
|
||||||
import { goto } from "$app/navigation";
|
import { goto } from "$app/navigation";
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
|
import Us from "$lib/components/maps/US.svelte";
|
||||||
|
|
||||||
let viewType: String = "cards";
|
let viewType: String = "cards";
|
||||||
|
|
||||||
@@ -100,4 +101,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if viewType == "map"}{/if}
|
{#if viewType == "map"}
|
||||||
|
{#if data.countrycode.toLowerCase() == "us"}
|
||||||
|
<Us on:marked={markVisited} />
|
||||||
|
{/if}
|
||||||
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user