Added new trip plan creator and removed visit count stores

This commit is contained in:
Sean Morley
2024-05-06 23:13:32 +00:00
parent 75da1f4cc6
commit 01865951ac
19 changed files with 967 additions and 522 deletions

View File

@@ -1,6 +1,5 @@
<script lang="ts">
import { enhance } from "$app/forms";
import { visitCount } from "$lib/utils/stores/visitCountStore";
import { goto } from "$app/navigation";
import type { DatabaseUser } from "$lib/server/auth";
export let user: any;
@@ -47,20 +46,6 @@
infoModalOpen = false;
}
// get value from fetch /api/visitcount
$: if (user) {
onMount(async () => {
const res = await fetch("/api/visitcount");
const data = await res.json();
visitCount.set(data.visitCount);
});
}
visitCount.subscribe((value) => {
count = value;
});
// Set the visit count to the number of adventures stored in local storage
const isBrowser = typeof window !== "undefined";
if (isBrowser) {