File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,9 @@ import { SelectedPick } from '@xata.io/client';
6
6
import { ChangeEvent , useState } from 'react' ;
7
7
import axios from 'axios' ;
8
8
9
+ type Report = Readonly < SelectedPick < ReportsRecord , [ '*' ] > > ;
9
10
interface ReportsPageProps {
10
- reports : Readonly < SelectedPick < ReportsRecord , [ '*' ] > > [ ] ;
11
+ reports : Report [ ] ;
11
12
}
12
13
13
14
export default function ReportsPage ( { reports } : ReportsPageProps ) {
@@ -24,11 +25,7 @@ export default function ReportsPage({ reports }: ReportsPageProps) {
24
25
) ;
25
26
}
26
27
27
- function ReportCard ( {
28
- report
29
- } : {
30
- report : ReportsPageProps [ 'reports' ] [ number ] ;
31
- } ) {
28
+ function ReportCard ( { report } : { report : Report } ) {
32
29
const [ isValid , setIsValid ] = useState ( report . valid ) ;
33
30
34
31
async function handleToggleVisibility ( e : ChangeEvent < HTMLInputElement > ) {
You can’t perform that action at this time.
0 commit comments