From 616208071c54ca95f0460d79c39a878e41272ae8 Mon Sep 17 00:00:00 2001 From: Benny Samir Hierl Date: Wed, 2 Feb 2022 23:20:24 +0100 Subject: [PATCH] cleanup code Signed-off-by: Benny Samir Hierl --- src/composables/useWishlistStore.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/composables/useWishlistStore.ts b/src/composables/useWishlistStore.ts index 71ccfbf..9177509 100644 --- a/src/composables/useWishlistStore.ts +++ b/src/composables/useWishlistStore.ts @@ -3,11 +3,11 @@ import { Wishlist, WishlistItem } from '@/types' import { ref } from 'vue' const { client } = useAxios() -const refState = ref({}) +const list = ref(null) const fetch = async (slugText: string): Promise => { const { data } = await client.get(`/wishlist/${slugText}`) - refState.value = data + list.value = data } const updateItem = async (item: WishlistItem): Promise => { @@ -16,7 +16,7 @@ const updateItem = async (item: WishlistItem): Promise => { export const useWishlistStore = () => { return { - list: refState, + list, fetch, updateItem, }