diff --git a/src/lib/assets/pinLogo.svg b/src/lib/assets/pinLogo.svg
new file mode 100644
index 0000000..cf27faa
--- /dev/null
+++ b/src/lib/assets/pinLogo.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/lib/components/EditModal.svelte b/src/lib/components/EditModal.svelte
new file mode 100644
index 0000000..d13f56f
--- /dev/null
+++ b/src/lib/components/EditModal.svelte
@@ -0,0 +1,50 @@
+
+
+
\ No newline at end of file
diff --git a/src/lib/components/Footer.svelte b/src/lib/components/Footer.svelte
index 68fa2c2..ed3bef5 100644
--- a/src/lib/components/Footer.svelte
+++ b/src/lib/components/Footer.svelte
@@ -1,18 +1,19 @@
-
+
-
-
-
+
diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte
index 534aa43..603c41b 100644
--- a/src/lib/components/Navbar.svelte
+++ b/src/lib/components/Navbar.svelte
@@ -19,16 +19,5 @@
{#each adventures as adventure (adventure.id)}
@@ -82,16 +119,17 @@
+
{/if}
-{#if !Number.isNaN(editId)}
+
{#if adventures.length != 0}
diff --git a/src/services/adventureService.ts b/src/services/adventureService.ts
index 46aff5b..55e350b 100644
--- a/src/services/adventureService.ts
+++ b/src/services/adventureService.ts
@@ -41,12 +41,18 @@ export function removeAdventure(event: { detail: number; }) {
}
}
-export function saveEdit(editId:number, editName:string, editLocation:string, editCreated:string) {
- const adventure = adventures.find(adventure => adventure.id === editId);
- if (adventure) {
- adventure.name = editName;
- adventure.location = editLocation;
- adventure.created = editCreated;
+export function saveEdit(adventure:Adventure) {
+ let editId = adventure.id;
+ console.log("saving edit")
+ let editName = adventure.name;
+ let editLocation = adventure.location;
+ let editCreated = adventure.created;
+ let oldAdventure: Adventure | undefined = adventures.find(adventure => adventure.id === editId);
+ console.log("old" + oldAdventure)
+ if (oldAdventure) {
+ oldAdventure.name = editName;
+ oldAdventure.location = editLocation;
+ oldAdventure.created = editCreated;
}
editId = NaN;
console.log("done")