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}) }