Skip to content

Commit

Permalink
feat: fix display bug
Browse files Browse the repository at this point in the history
  • Loading branch information
BrocksiNet committed May 16, 2024
1 parent 0ea15fa commit d7ff926
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/composables/src/useSyncWishlist.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("useSyncWishlist", () => {
const { vm } = useSetup(() => useSyncWishlist());

vm.getWishlistProducts();
expect(vm.totalWishlistItemsCount).toBe(15);
expect(vm.totalWishlistItemsCount).toBe(0);
expect(vm.items.length).toBe(0);
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/composables/src/useSyncWishlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export type UseSyncWishlistReturn = {
};

const _wishlistItems: Ref<string[]> = ref([]);
const totalWishlistItemsCount: Ref<number> = ref(15);
const totalWishlistItemsCount: Ref<number> = ref(0);

/**
* Composable to manage wishlist via API
Expand Down
2 changes: 1 addition & 1 deletion packages/composables/src/useWishlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export function useWishlist(): UseWishlistReturn {
};

const getTotalPagesCount = computed(() =>
Math.ceil(totalWishlistItemsCount.value / +limit.value),
Math.ceil(totalWishlistItemsCount.value / limit.value),
);

const clearWishlist = async () => {
Expand Down

0 comments on commit d7ff926

Please sign in to comment.