1- import { useState , useEffect , useRef } from 'react' ;
1+ import { useEffect , useRef , useState } from 'react' ;
22import { Link , useSearchParams } from 'react-router-dom' ;
33import {
44 Anchor ,
@@ -11,6 +11,7 @@ import {
1111 TextInput ,
1212 Title
1313} from '@mantine/core' ;
14+
1415import { TestRecord } from '../types' ;
1516import { diffDisplay , diffStyle } from '../utils' ;
1617
@@ -42,7 +43,7 @@ function CompareCell({ type, group, name, hardware1, hardware2 }: Props) {
4243 textAlign : 'center'
4344 } }
4445 >
45- < Anchor href = { compareUrl } target = "_blank" >
46+ < Anchor href = { compareUrl } target = { "_blank" } >
4647 < img
4748 src = { compareUrl }
4849 alt = { `${ hardware1 } vs ${ hardware2 } ` }
@@ -55,7 +56,7 @@ function CompareCell({ type, group, name, hardware1, hardware2 }: Props) {
5556 mt = { 2 }
5657 style = { { borderRadius : 4 , display : 'inline-block' , ...diffStyle ( pixelError ) } }
5758 >
58- < Text size = "sm" > { diffDisplay ( pixelError ) } </ Text >
59+ < Text size = { "sm" } > { diffDisplay ( pixelError ) } </ Text >
5960 </ Box >
6061 ) }
6162 </ Table . Td >
@@ -111,37 +112,37 @@ export default function Compare() {
111112 < Box >
112113 { /* Header */ }
113114 < Box
114- py = "md"
115+ py = { "md" }
115116 style = { { textAlign : 'center' , backgroundColor : 'var(--mantine-color-dark-7)' } }
116117 >
117118 < Title order = { 1 } style = { { fontVariant : 'small-caps' } } >
118- < Link to = "/" style = { { textDecoration : 'none' , color : 'white' } } >
119+ < Link to = { "/" } style = { { textDecoration : 'none' , color : 'white' } } >
119120 OpenSpace Image Testing
120121 </ Link >
121122 </ Title >
122123 </ Box >
123124
124125 { /* Input fields */ }
125126 < Group
126- p = "sm"
127- align = "flex-end"
127+ p = { "sm" }
128+ align = { "flex-end" }
128129 style = { { backgroundColor : 'var(--mantine-color-dark-6)' } }
129130 >
130131 < TextInput
131- label = "Group"
132- size = "sm"
132+ label = { "Group" }
133+ size = { "sm" }
133134 value = { group }
134135 onChange = { ( e ) => setGroup ( e . target . value ) }
135136 />
136137 < TextInput
137- label = "Name"
138- size = "sm"
138+ label = { "Name" }
139+ size = { "sm" }
139140 value = { name }
140141 onChange = { ( e ) => setName ( e . target . value ) }
141142 />
142143 < Select
143- label = "Type"
144- size = "sm"
144+ label = { "Type" }
145+ size = { "sm" }
145146 w = { 160 }
146147 value = { type }
147148 onChange = { ( val ) => setType ( ( val ?? 'reference' ) as ImageType ) }
@@ -156,15 +157,15 @@ export default function Compare() {
156157 </ Group >
157158
158159 { shareUrl && (
159- < Box px = "sm" py = "xs" >
160- < Anchor href = { shareUrl } size = "sm" >
160+ < Box px = { "sm" } py = { "xs" } >
161+ < Anchor href = { shareUrl } size = { "sm" } >
161162 { shareUrl }
162163 </ Anchor >
163164 </ Box >
164165 ) }
165166
166167 { hasResult && (
167- < Table id = "splom" withColumnBorders withTableBorder >
168+ < Table id = { "splom" } withColumnBorders withTableBorder >
168169 < Table . Tbody >
169170 { hardwares . map ( ( hw , i ) => (
170171 < Table . Tr key = { hw } >
@@ -182,15 +183,15 @@ export default function Compare() {
182183 >
183184 < Anchor
184185 href = { `/api/result/${ rType } /${ rGroup } /${ rName } /${ hw } ` }
185- target = "_blank"
186+ target = { "_blank" }
186187 >
187188 < img
188189 src = { `/api/result/${ rType } -thumbnail/${ rGroup } /${ rName } /${ hw } ` }
189190 alt = { hw }
190191 style = { { width : 150 , height : 84.375 } }
191192 />
192193 </ Anchor >
193- < Text size = "sm" ta = "center" >
194+ < Text size = { "sm" } ta = { "center" } >
194195 { hw }
195196 </ Text >
196197 </ Table . Td >
0 commit comments