This commit is contained in:
Michael Genson 2025-07-31 16:02:52 +00:00
commit 7e5924d692
2 changed files with 4 additions and 3 deletions

View file

@ -3,7 +3,7 @@ import type { ShoppingListOut, ShoppingListItemOut } from "~/lib/api/types/house
/** /**
* Composable for managing shopping list state and reactive data * Composable for managing shopping list state and reactive data
*/ */
export function useShoppingListState(listId: string) { export function useShoppingListState() {
const shoppingList = ref<ShoppingListOut | null>(null); const shoppingList = ref<ShoppingListOut | null>(null);
const loadingCounter = ref(1); const loadingCounter = ref(1);
const recipeReferenceLoading = ref(false); const recipeReferenceLoading = ref(false);

View file

@ -12,7 +12,7 @@ import { useShoppingListRecipes } from "~/composables/shopping-list-page/sub-com
*/ */
export function useShoppingListPage(listId: string) { export function useShoppingListPage(listId: string) {
// Initialize state // Initialize state
const state = useShoppingListState(listId); const state = useShoppingListState();
const { const {
shoppingList, shoppingList,
loadingCounter, loadingCounter,
@ -35,7 +35,8 @@ export function useShoppingListPage(listId: string) {
if (!preserveItemOrder.value) { if (!preserveItemOrder.value) {
groupAndSortListItemsByFood(shoppingList.value); groupAndSortListItemsByFood(shoppingList.value);
} else { }
else {
sortListItems(shoppingList.value); sortListItems(shoppingList.value);
} }