Update AdventureCard component and add country flag support

This commit is contained in:
Sean Morley
2024-04-13 20:09:00 +00:00
parent fd1b85609e
commit 02455d290b
5 changed files with 77 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
<script lang="ts">
import { goto } from "$app/navigation";
import { getFlag } from "$lib";
import AdventureCard from "$lib/components/AdventureCard.svelte";
export let data: any;
@@ -7,9 +8,6 @@
async function nav(loc: string) {
goto(`/worldtravel/${loc}`);
}
function getFlag(country: string) {
return `https://flagcdn.com/h24/${country}.png`;
}
</script>
<h1 class="text-center font-bold text-4xl mb-4">Country List</h1>