mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-04 12:45:17 +02:00
Add US map component to world travel page
This commit is contained in:
parent
8133e8e99e
commit
715a4ffd87
2 changed files with 10 additions and 1 deletions
|
@ -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">
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue