1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-08-04 04:35:19 +02:00

Add US map component to world travel page

This commit is contained in:
Sean Morley 2024-04-14 17:58:18 +00:00
parent 8133e8e99e
commit 715a4ffd87
2 changed files with 10 additions and 1 deletions

View file

@ -1,6 +1,9 @@
<script lang="ts">
import { createEventDispatcher } from "svelte";
const dispatch = createEventDispatcher();
function handleStateClick(stateCode: String) {
console.log(`Clicked on ${stateCode}`);
dispatch("marked", stateCode);
}
</script>
@ -12,6 +15,7 @@
version="1.1"
width="1200"
height="600"
fill="#ffffff"
>
<defs id="defs282" />
<g id="viewport">

View file

@ -5,6 +5,7 @@
import { getFlag } from "$lib";
import { goto } from "$app/navigation";
import { onMount } from "svelte";
import Us from "$lib/components/maps/US.svelte";
let viewType: String = "cards";
@ -100,4 +101,8 @@
</div>
{/if}
{#if viewType == "map"}{/if}
{#if viewType == "map"}
{#if data.countrycode.toLowerCase() == "us"}
<Us on:marked={markVisited} />
{/if}
{/if}