+
+
+
+
+
+
+
+
diff --git a/src/stores/api.js b/src/stores/api.js
index 9774a37..f3aaad7 100644
--- a/src/stores/api.js
+++ b/src/stores/api.js
@@ -1,11 +1,40 @@
import { defineStore } from "pinia";
export const useApiStore = defineStore("counter", () => {
- async function fetchPageData() {
- const isHomePage = window.location.pathname === "/";
+ /**
+ * Asynchronously fetches JSON data corresponding to a given path.
+ *
+ * @param {string} [path=window.location.pathname] - The path for which to fetch data.
+ * - If no path is provided, the function will use the current page's path.
+ * - If the path is "/", it is assumed to be the homepage, and "home.json" is fetched.
+ * - For other paths, the function will append ".json" to the path and fetch that URL.
+ *
+ * @returns {Promise