From 2010270bcf330b01ec63deafaba2c002b0bcc543 Mon Sep 17 00:00:00 2001 From: "Ruidy (aider)" Date: Sat, 14 Dec 2024 15:28:20 +0100 Subject: [PATCH] feat: Add Zod validation for categories API response --- components/CategoryCard.vue | 38 +++++++++---------- .../{categories.vue => categories/index.vue} | 17 +++++---- server/trpc/routers/categories.ts | 25 ++++++------ types/category.ts | 22 +++++++++++ types/recipe.ts | 1 + 5 files changed, 64 insertions(+), 39 deletions(-) rename pages/{categories.vue => categories/index.vue} (80%) create mode 100644 types/category.ts diff --git a/components/CategoryCard.vue b/components/CategoryCard.vue index 2388837..80d4f93 100644 --- a/components/CategoryCard.vue +++ b/components/CategoryCard.vue @@ -1,30 +1,28 @@ + + - - diff --git a/pages/categories.vue b/pages/categories/index.vue similarity index 80% rename from pages/categories.vue rename to pages/categories/index.vue index edf2bca..894880b 100644 --- a/pages/categories.vue +++ b/pages/categories/index.vue @@ -1,6 +1,8 @@