Sort Bangs by identifier.

This commit is contained in:
Bauke 2022-03-15 18:59:46 +01:00
parent 42f5c15826
commit 8b76be1c0f
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 2 additions and 1 deletions

View File

@ -37,7 +37,8 @@ export class PageMain extends Component<Props, State> {
const bangs = Object.entries(localStorage)
.filter(([key, _bang]) => key.startsWith('!'))
.map(([_key, bang]) => bang as BangParameters);
.map(([_key, bang]) => bang as BangParameters)
.sort((a, b) => a.id.localeCompare(b.id));
this.setState({bangs: this.state.bangs.concat(bangs)});
}