mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-02 20:15:24 +02:00
feat: Migrate to Nuxt 3 framework (#5184)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com> Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
This commit is contained in:
parent
89ab7fac25
commit
c24d532608
403 changed files with 23959 additions and 19557 deletions
|
@ -1,6 +1,5 @@
|
|||
import { ref, Ref } from "@nuxtjs/composition-api";
|
||||
import { useData, useReadOnlyStore, useStore } from "../partials/use-store-factory";
|
||||
import { RecipeTool } from "~/lib/api/types/recipe";
|
||||
import type { RecipeTool } from "~/lib/api/types/recipe";
|
||||
import { usePublicExploreApi, useUserApi } from "~/composables/api";
|
||||
|
||||
interface RecipeToolWithOnHand extends RecipeTool {
|
||||
|
@ -19,14 +18,14 @@ export const useToolData = function () {
|
|||
onHand: false,
|
||||
householdsWithTool: [],
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const useToolStore = function () {
|
||||
const api = useUserApi();
|
||||
return useStore<RecipeTool>(store, loading, api.tools);
|
||||
}
|
||||
};
|
||||
|
||||
export const usePublicToolStore = function (groupSlug: string) {
|
||||
const api = usePublicExploreApi(groupSlug).explore;
|
||||
return useReadOnlyStore<RecipeTool>(store, publicLoading, api.tools);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue