@@ -12,14 +12,8 @@ function SearchPage() {
1212 const singleKeyUrl = process . env . REACT_APP_CONTENT_GRAPH_GATEWAY_URL as string
1313 const ARTIST = "Artist"
1414 const OTHERCONTENT = "OtherContent"
15- const options : { value : string ; key : string } [ ] = [
16- { value : "ASC" , key : "ASC" } ,
17- { value : "DESC" , key : "DESC" }
18- ]
19- const itemsPerPageOptions : { value : number ; key : string } [ ] = [
20- { value : 10 , key : "10" } ,
21- { value : 15 , key : "15" }
22- ]
15+ const options : string [ ] = [ "ASC" , "DESC" ]
16+ const itemsPerPageOptions : number [ ] = [ 10 , 15 ]
2317 const filterByOption : { value : string ; key : string } [ ] = [
2418 { value : "Artists" , key : ARTIST } ,
2519 { value : "Other Content" , key : OTHERCONTENT }
@@ -174,9 +168,9 @@ function SearchPage() {
174168 < span > Sort: </ span >
175169 < select onChange = { e => handleChange ( e ) } className = "Button" >
176170 {
177- options . map ( ( option ) => {
171+ options . map ( ( value , idx ) => {
178172 return (
179- < option key = { option . key } value = { option . key } > { option . value } </ option >
173+ < option key = { idx } value = { value } > { value } </ option >
180174 )
181175 } )
182176 }
@@ -243,9 +237,9 @@ function SearchPage() {
243237 < span > Items per page: </ span >
244238 < select className = "Button" onChange = { handleItemsChange } >
245239 {
246- itemsPerPageOptions . map ( ( option ) => {
240+ itemsPerPageOptions . map ( ( option , idx ) => {
247241 return (
248- < option key = { option . key } value = { option . key } > { option . value } </ option >
242+ < option key = { idx } value = { option } > { option } </ option >
249243 )
250244 } )
251245 }
@@ -298,9 +292,9 @@ function SearchPage() {
298292 < span > Items per page: </ span >
299293 < select className = "Button" onChange = { handleOtherItemsChange } >
300294 {
301- itemsPerPageOptions . map ( ( option ) => {
295+ itemsPerPageOptions . map ( ( option , idx ) => {
302296 return (
303- < option key = { option . key } value = { option . key } > { option . value } </ option >
297+ < option key = { idx } value = { option } > { option } </ option >
304298 )
305299 } )
306300 }
0 commit comments