Skip to content

Commit

Permalink
fix(ts): JSX.Element has be deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcath committed Dec 13, 2024
1 parent 7eaddf6 commit a51114c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/lib/dashboard/boxes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {recentItemsBox} from './recent-items'
import {statsBox} from './stats'

export type DashboardBoxFn<Data> = {
render: (data: Data, meta: string) => JSX.Element
metaComponent: (meta: string, id: string) => JSX.Element
render: (data: Data, meta: string) => React.ReactElement
metaComponent: (meta: string, id: string) => React.ReactElement
}

export const DashboardBox = ({
Expand Down
10 changes: 6 additions & 4 deletions app/lib/fields/field.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {type ReactElement} from 'react'

import {attachmentField} from './attachment'
import {dateField} from './date'
import {imageField} from './image'
Expand All @@ -24,7 +26,7 @@ export type Field = {
helperText: string
meta: string
validation: {required: boolean}
}) => JSX.Element
}) => ReactElement
viewComponent: ({
value,
title,
Expand All @@ -33,7 +35,7 @@ export type Field = {
value: string
title: string
meta: string
}) => JSX.Element
}) => ReactElement
listComponent: ({
value,
title,
Expand All @@ -42,8 +44,8 @@ export type Field = {
value: string
title: string
meta: string
}) => JSX.Element
metaComponent: ({meta}: {meta: string}) => JSX.Element
}) => ReactElement
metaComponent: ({meta}: {meta: string}) => ReactElement
}

export const FIELD_TYPES = [
Expand Down

0 comments on commit a51114c

Please sign in to comment.