File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { defaultSettings, settingNames } from '../models/Settings';
1010const Popup = ( ) => {
1111 const [ settings , setSettings ] = useState < Settings > ( defaultSettings ) ;
1212 const storage = getStorage ( ) ;
13+ const sortedAgents = agents . slice ( ) . sort ( ( a , b ) => a . localeCompare ( b ) ) ;
1314
1415 function setValues ( updatedSettings : Partial < Settings > ) {
1516 setSettings ( ( prevSettings ) => ( {
@@ -109,7 +110,7 @@ const Popup = () => {
109110 </ p >
110111 < h2 style = { { textAlign : 'center' } } > My Shopping Agent</ h2 >
111112 < select onChange = { handleChangeMyAgent } value = { settings . myAgent } >
112- { agentsWithRaw . map ( ( agent ) => (
113+ { [ ... sortedAgents , 'raw' ] . map ( ( agent ) => (
113114 < option value = { agent } key = { `my-agent-select-${ agent } ` } >
114115 { agent }
115116 </ option >
@@ -230,7 +231,7 @@ const Popup = () => {
230231 { settings . showToolbar ? (
231232 < >
232233 < h4 > toolbar includes:</ h4 >
233- { agents . map ( ( agent ) => {
234+ { sortedAgents . map ( ( agent ) => {
234235 const checked = settings . agentsInToolbar . includes ( agent ) ;
235236
236237 function swap ( ) {
You can’t perform that action at this time.
0 commit comments