diff --git a/src/lib/components/CreateNewAdventure.svelte b/src/lib/components/CreateNewAdventure.svelte
index bcc6033..8b236c6 100644
--- a/src/lib/components/CreateNewAdventure.svelte
+++ b/src/lib/components/CreateNewAdventure.svelte
@@ -163,12 +163,14 @@
-
-
+
+
+
+
diff --git a/src/lib/components/EditModal.svelte b/src/lib/components/EditModal.svelte
index c84c7e5..82021f2 100644
--- a/src/lib/components/EditModal.svelte
+++ b/src/lib/components/EditModal.svelte
@@ -4,7 +4,7 @@
import type { Adventure } from "$lib/utils/types";
const dispatch = createEventDispatcher();
import { onMount } from "svelte";
- import { addActivityType } from "$lib";
+ import { addActivityType, generateDescription, getImage } from "$lib";
let modal: HTMLDialogElement;
console.log(adventureToEdit.id);
@@ -41,6 +41,28 @@
adventureToEdit = addActivityType(activityInput, adventureToEdit);
activityInput = "";
}
+
+ async function generate() {
+ try {
+ console.log(adventureToEdit.name);
+ const desc = await generateDescription(adventureToEdit.name);
+ adventureToEdit.description = desc;
+ // Do something with the updated newAdventure object
+ } catch (error) {
+ console.error(error);
+ // Handle the error
+ }
+ }
+
+ async function searchImage() {
+ try {
+ const imageUrl = await getImage(adventureToEdit.name);
+ adventureToEdit.imageUrl = imageUrl;
+ } catch (error) {
+ console.error(error);
+ // Handle the error
+ }
+ }
diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte
index c94a194..0f15392 100644
--- a/src/lib/components/Navbar.svelte
+++ b/src/lib/components/Navbar.svelte
@@ -97,7 +97,9 @@
{/if}
- AdventureLog 🗺️
+ AdventureLog
-{#if adventuresPlans.length == 0 && !isLoadingIdeas && !isLoadingTrips && !isShowingMoreFields && !isShowingNewTrip && tripPlans.length == 0}
+{#if adventuresPlans.length == 0 && !isLoadingIdeas && !isLoadingTrips && !isShowingMoreFields && !isShowingNewTrip && tripPlans.length > 0}
Add some plans!

@@ -284,13 +284,20 @@
{/each}
-{#if tripPlans.length == 0 && !isLoadingIdeas && !isLoadingTrips && !isShowingMoreFields && !isShowingNewTrip}
+{#if tripPlans.length == 0 && !isLoadingIdeas && !isLoadingTrips && !isShowingMoreFields && !isShowingNewTrip && adventuresPlans.length > 0}
Add some trips!
{/if}
+{#if tripPlans.length == 0 && !isLoadingIdeas && !isLoadingTrips && !isShowingMoreFields && !isShowingNewTrip && adventuresPlans.length == 0}
+
+
Add some trips and plans!
+

+
+{/if}
+
My Plans | AdventureLog
Country List
-{#each data.response as item}
-
-
-{/each}
+
+ {#each data.response as item}
+
+
+ {/each}
+
WorldTravel | AdventureLog