Added new trip plan creator and removed visit count stores
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { visitCount } from "$lib/utils/stores/visitCountStore";
|
||||
import type { Adventure } from "$lib/utils/types";
|
||||
|
||||
/**
|
||||
@@ -112,9 +111,6 @@ export async function addAdventure(
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
adventureArray.push(data.adventure);
|
||||
if (data.adventure.type === "mylog") {
|
||||
incrementVisitCount(1);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Error:", error);
|
||||
@@ -155,10 +151,3 @@ export async function changeType(
|
||||
|
||||
return adventureArray;
|
||||
}
|
||||
/**
|
||||
* Increments the visit count by the specified amount.
|
||||
* @param {number} amount - The amount to increment the visit count by.
|
||||
*/
|
||||
export function incrementVisitCount(amount: number) {
|
||||
visitCount.update((n) => n + 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user