fix: Stores Not Populating Sometimes (#6266)

This commit is contained in:
Michael Genson
2025-09-27 19:17:08 -05:00
committed by GitHub
parent e3f120c680
commit 824603a578
13 changed files with 31 additions and 27 deletions

View File

@@ -18,10 +18,10 @@ export const useFoodData = function () {
export const useFoodStore = function (i18n?: Composer) {
const api = useUserApi(i18n);
return useStore<IngredientFood>(store, loading, api.foods);
return useStore<IngredientFood>("food", store, loading, api.foods);
};
export const usePublicFoodStore = function (groupSlug: string, i18n?: Composer) {
const api = usePublicExploreApi(groupSlug, i18n).explore;
return useReadOnlyStore<IngredientFood>(store, publicLoading, api.foods);
return useReadOnlyStore<IngredientFood>("food", store, publicLoading, api.foods);
};