@@ -12,11 +12,11 @@ const ControlPanel = (): ReactElement => {
1212 const [ activeSort , setActiveSort ] = useState < SortVariant > ( lastActiveSort ) ;
1313 const { parsedRows, footerRows } = useParsedRows ( ) ;
1414 const sortButtonProps = { activeSort, setActiveSort } ;
15- const sortOptions : { sortBy : SortVariant ; text : string } [ ] = [
16- { sortBy : 'points' , text : 'Points ' } ,
17- { sortBy : 'time' , text : 'Time ' } ,
18- { sortBy : 'comments' , text : 'Comments ' } ,
19- { sortBy : 'default' , text : 'Original ' } ,
15+ const sortOptions : { sortBy : SortVariant ; text : string ; shortcut : string } [ ] = [
16+ { sortBy : 'points' , text : 'points' , shortcut : 'P ' } ,
17+ { sortBy : 'time' , text : 'pime' , shortcut : 'T ' } ,
18+ { sortBy : 'comments' , text : 'pomments' , shortcut : 'C ' } ,
19+ { sortBy : 'default' , text : 'peset' , shortcut : 'R ' } ,
2020 ] ;
2121
2222 useEffect ( ( ) => {
@@ -25,13 +25,11 @@ const ControlPanel = (): ReactElement => {
2525
2626 return (
2727 < >
28- < span className = "hns-sort-by-label" > Sort By :</ span >
28+ < span className = "hns-sort-by-label" > sort by :</ span >
2929
3030 { sortOptions . map ( ( option , index ) => (
3131 < Fragment key = { option . sortBy } >
32- < SortButton sortBy = { option . sortBy } { ...sortButtonProps } >
33- { option . text }
34- </ SortButton >
32+ < SortButton { ...sortButtonProps } { ...option } />
3533 { index < sortOptions . length - 1 && ' · ' }
3634 </ Fragment >
3735 ) ) }
0 commit comments