From 9837cc4e64f6497f9a9c9562681b68b12054950e Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Fri, 26 Apr 2024 23:09:39 +0000 Subject: [PATCH] Refactor database schema, remove unused SQL files, and update components --- src/lib/components/AdventureCard.svelte | 141 +++--------------- src/lib/components/Navbar.svelte | 4 - src/routes/planner/+page.server.ts | 21 --- src/routes/planner/+page.svelte | 31 ---- .../worldtravel/[countrycode]/+page.svelte | 4 +- .../[regioncode]/+page.server.ts | 34 ----- .../[countrycode]/[regioncode]/+page.svelte | 88 ----------- 7 files changed, 23 insertions(+), 300 deletions(-) delete mode 100644 src/routes/planner/+page.server.ts delete mode 100644 src/routes/planner/+page.svelte delete mode 100644 src/routes/worldtravel/[countrycode]/[regioncode]/+page.server.ts delete mode 100644 src/routes/worldtravel/[countrycode]/[regioncode]/+page.svelte diff --git a/src/lib/components/AdventureCard.svelte b/src/lib/components/AdventureCard.svelte index 1b2180f..4adc189 100644 --- a/src/lib/components/AdventureCard.svelte +++ b/src/lib/components/AdventureCard.svelte @@ -15,8 +15,6 @@ export let regionId: String | undefined = undefined; export let visited: Boolean | undefined = undefined; export let countryCode: String | undefined = undefined; - export let activityTypes: String[] | undefined = undefined; - export let description: String | undefined = undefined; function remove() { dispatch("remove", id); @@ -41,128 +39,31 @@ } -{#if type === "mylog"} -
-
-

{name}

- {#if location !== ""} -
- -

{location}

-
- {/if} - {#if date && date !== ""} -
- -

{date}

-
- {/if} -
+
+
+

{name}

+ {#if location && location !== ""} +
+ +

{location}

+
+ {/if} + {#if date && date !== ""} +
+ +

{date}

+
+ {/if} +
+ {#if type == "mylog"} -
-
-
-{/if} - -{#if type === "featured"} -
-
-

{name}

- {#if location && location != ""} -
- -

{location}

-
{/if} -
+ {#if type == "featured"} -
-
-
-{/if} - -{#if type === "shared"} -
-
-

{name}

- {#if location && location !== ""} -
- -

{location}

-
- {/if} - {#if date !== ""} -
- -

{date}

-
{/if}
-{/if} - -{#if type === "worldtravelregion"} -
-
-

{name}

-

{regionId}

-
- - {#if !visited} - - {/if} - {#if visited} - - {/if} -
-
-
-{/if} - -{#if type === "planner"} -
-
-

{name}

- {#if location != ""} -
- -

{location}

-
- {/if} - {#if activityTypes && activityTypes.length > 0} - {#each activityTypes as activity} -
- {activity} -
- {/each} - {/if} - {#if description && description.length > 0} -

{description}

- {/if} - {#if date && date != undefined} -
- -

{date}

-
- {/if} -
- -
-
-
-{/if} +
diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte index 3f799de..48997b2 100644 --- a/src/lib/components/Navbar.svelte +++ b/src/lib/components/Navbar.svelte @@ -78,10 +78,6 @@ - {/if}