From 4034e3574ba1aaccc9e4e9d82f894e47a94e04da Mon Sep 17 00:00:00 2001 From: SKairinos Date: Thu, 15 Aug 2024 12:15:57 +0000 Subject: [PATCH] minor fixes --- src/api/fruit.ts | 2 +- src/pages/fruitDetail/FruitDetail.tsx | 4 +++- src/pages/fruitList/FruitList.tsx | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/api/fruit.ts b/src/api/fruit.ts index 4f69268..1dd8c28 100644 --- a/src/api/fruit.ts +++ b/src/api/fruit.ts @@ -22,7 +22,7 @@ export type Fruit = Model< { name: string is_citrus: boolean - expires_on: Date + expires_on: string } > diff --git a/src/pages/fruitDetail/FruitDetail.tsx b/src/pages/fruitDetail/FruitDetail.tsx index 88ab50c..f3e2c01 100644 --- a/src/pages/fruitDetail/FruitDetail.tsx +++ b/src/pages/fruitDetail/FruitDetail.tsx @@ -51,6 +51,8 @@ const FruitDetail: FC = () => { Update fruit + + fruit list @@ -58,7 +60,7 @@ const FruitDetail: FC = () => { )), onValidationSuccess: params => { - retrieveFruit(params.id) + retrieveFruit(params.id, true) }, onValidationError: navigate => { navigate(paths.fruits._, { diff --git a/src/pages/fruitList/FruitList.tsx b/src/pages/fruitList/FruitList.tsx index 3d6f2ec..e7b0765 100644 --- a/src/pages/fruitList/FruitList.tsx +++ b/src/pages/fruitList/FruitList.tsx @@ -30,10 +30,10 @@ const FruitList: FC = () => { {fruits => fruits.map(fruit => ( - + {fruit.id} - : {fruit.name} ({fruit.expires_on.toDateString()}) + {fruit.name} ({fruit.expires_on}) }