From a567a4c41a67d2e9a7316f0b65f5a59021504053 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Sun, 28 Apr 2024 19:55:24 +0200 Subject: [PATCH] use shared component for the recipe --- components/recipe/index.vue | 27 +++++++++++++++++++++++++++ pages/[id].vue | 18 +----------------- pages/random.vue | 24 +----------------------- 3 files changed, 29 insertions(+), 40 deletions(-) create mode 100644 components/recipe/index.vue diff --git a/components/recipe/index.vue b/components/recipe/index.vue new file mode 100644 index 0000000..b6402ca --- /dev/null +++ b/components/recipe/index.vue @@ -0,0 +1,27 @@ + + + diff --git a/pages/[id].vue b/pages/[id].vue index 7726872..1f4b66c 100644 --- a/pages/[id].vue +++ b/pages/[id].vue @@ -7,22 +7,6 @@ const { recipe, pending, error } = await useRecipe("lookup", params.id);
Loading
Failed: {{ error }}
-
-
- -
- - -
-
-

Instructions

-

{{ recipe.instructions }}

-
+
diff --git a/pages/random.vue b/pages/random.vue index ab68a1a..269f3f7 100644 --- a/pages/random.vue +++ b/pages/random.vue @@ -1,10 +1,4 @@ @@ -12,22 +6,6 @@ const { recipe, pending, error } = await useRecipe("random");
Loading
Failed: {{ error }}
-
-
- -
- - -
-
-

Instructions

-

{{ recipe.instructions }}

-
+