@@ -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 }
@@ -176,9 +170,9 @@ function SearchPage() {
176170 < span > Sort: </ span >
177171 < select onChange = { e => handleChange ( e ) } className = "Button" >
178172 {
179- options . map ( ( option ) => {
173+ options . map ( ( value , idx ) => {
180174 return (
181- < option key = { option . key } value = { option . key } > { option . value } </ option >
175+ < option key = { idx } value = { value } > { value } </ option >
182176 )
183177 } )
184178 }
@@ -245,9 +239,9 @@ function SearchPage() {
245239 < span > Items per page: </ span >
246240 < select className = "Button" onChange = { handleItemsChange } >
247241 {
248- itemsPerPageOptions . map ( ( option ) => {
242+ itemsPerPageOptions . map ( ( option , idx ) => {
249243 return (
250- < option key = { option . key } value = { option . key } > { option . value } </ option >
244+ < option key = { idx } value = { option } > { option } </ option >
251245 )
252246 } )
253247 }
@@ -300,9 +294,9 @@ function SearchPage() {
300294 < span > Items per page: </ span >
301295 < select className = "Button" onChange = { handleOtherItemsChange } >
302296 {
303- itemsPerPageOptions . map ( ( option ) => {
297+ itemsPerPageOptions . map ( ( option , idx ) => {
304298 return (
305- < option key = { option . key } value = { option . key } > { option . value } </ option >
299+ < option key = { idx } value = { option } > { option } </ option >
306300 )
307301 } )
308302 }
0 commit comments