diff --git a/src/components/ChooseFood.vue b/src/components/ChooseFood.vue index 5973e80..a153366 100644 --- a/src/components/ChooseFood.vue +++ b/src/components/ChooseFood.vue @@ -8,7 +8,12 @@ import { meat, staple, tools, vegetable } from '~/data/food' import recipeData from '~/data/recipe.json' import type { Recipe } from '~/types' import { useRecipeStore } from '~/stores/recipe' -const recipe = ref(recipeData as Recipe) +import { generateEmojisFromStuff } from '~/utils' + +(recipeData as Recipe).forEach((recipe) => { + recipe.emojis = generateEmojisFromStuff(recipe.stuff) +}) +const recipe = ref(recipeData as Recipe) const rStore = useRecipeStore() const curStuff = computed(() => rStore.selectedStuff) @@ -65,7 +70,7 @@ const clickTool = (item: StuffItem) => {