Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SKairinos committed Aug 15, 2024
1 parent d819bbb commit 4034e35
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/api/fruit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type Fruit = Model<
{
name: string
is_citrus: boolean
expires_on: Date
expires_on: string
}
>

Expand Down
4 changes: 3 additions & 1 deletion src/pages/fruitDetail/FruitDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,16 @@ const FruitDetail: FC<FruitDetailProps> = () => {
<forms.SubmitButton>Update fruit</forms.SubmitButton>
</Stack>
</forms.Form>
</pages.Section>
<pages.Section>
<Link className="back-to" to={paths.fruits._}>
fruit list
</Link>
</pages.Section>
</pages.Page>
)),
onValidationSuccess: params => {
retrieveFruit(params.id)
retrieveFruit(params.id, true)
},
onValidationError: navigate => {
navigate(paths.fruits._, {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/fruitList/FruitList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ const FruitList: FC<FruitListProps> = () => {
<TablePagination useLazyListQuery={useLazyListFruitsQuery}>
{fruits =>
fruits.map(fruit => (
<Stack direction="row" key={fruit.id}>
<Stack direction="row" key={fruit.id} gap={5}>
<Typography fontWeight="bold">{fruit.id}</Typography>
<Typography>
: {fruit.name} ({fruit.expires_on.toDateString()})
{fruit.name} ({fruit.expires_on})
</Typography>
<FormControlLabel
control={<Checkbox disabled checked={fruit.is_citrus} />}
Expand Down

0 comments on commit 4034e35

Please sign in to comment.