mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-01 18:53:59 -04:00
fix(frontend): 🐛 fix section titles carrying over on deleted items (#765)
* fix(frontend): 🐛 fix section titles carrying over on deleted items Added a UUID generator to generate unique id's and prevent list changes from causing proper virtual dom re-renders. * lazy load json editor * fix ingredient rendering error * move text to input * update settings styling * improve mobile view Co-authored-by: Hayden <hay-kot@pm.me>
This commit is contained in:
@@ -14,9 +14,17 @@ export const useRecipeContext = function () {
|
||||
}, slug);
|
||||
|
||||
loading.value = false;
|
||||
|
||||
return recipe;
|
||||
}
|
||||
|
||||
async function fetchRecipe(slug: string) {
|
||||
loading.value = true;
|
||||
const { data } = await api.recipes.getOne(slug);
|
||||
loading.value = false;
|
||||
return data;
|
||||
}
|
||||
|
||||
async function deleteRecipe(slug: string) {
|
||||
loading.value = true;
|
||||
const { data } = await api.recipes.deleteOne(slug);
|
||||
@@ -31,5 +39,5 @@ export const useRecipeContext = function () {
|
||||
return data;
|
||||
}
|
||||
|
||||
return { loading, getBySlug, deleteRecipe, updateRecipe };
|
||||
return { loading, getBySlug, deleteRecipe, updateRecipe, fetchRecipe };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user