diff --git a/composables/useGreeting.ts b/composables/useGreeting.ts deleted file mode 100644 index f15c9c2..0000000 --- a/composables/useGreeting.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default function useGreeting(text: string) { - const { $client } = useNuxtApp(); - return $client.hello.useQuery({ text }); -} diff --git a/composables/useRecipeById.ts b/composables/useRecipeById.ts new file mode 100644 index 0000000..a2692de --- /dev/null +++ b/composables/useRecipeById.ts @@ -0,0 +1,4 @@ +export default function useRecipeById(id: number) { + const { $client } = useNuxtApp(); + return $client.recipeGet.useQuery(id); +} diff --git a/error.vue b/error.vue index 4918d99..fea2d4c 100644 --- a/error.vue +++ b/error.vue @@ -26,7 +26,7 @@ {{ error?.statusCode || "Error" }}

- {{ error?.message || "Something went wrong" }} + {{ error?.statusMessage || "Something went wrong" }}

diff --git a/pages/[id].vue b/pages/[id].vue index 5234871..92570be 100644 --- a/pages/[id].vue +++ b/pages/[id].vue @@ -1,31 +1,32 @@ diff --git a/pages/index.vue b/pages/index.vue index 4691f6e..1c55169 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,7 +1,3 @@ - -