Skip to content

Commit

Permalink
refactor(description component): use existing globals
Browse files Browse the repository at this point in the history
  • Loading branch information
domsteinbach committed Oct 31, 2023
1 parent 6b4ae9e commit 0bdbb72
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
import { ApplicationStateService } from '@dasch-swiss/vre/shared/app-state-service';
import {RouteConstants} from "@dasch-swiss/vre/shared/app-config";
import { StringLiteral } from '@dasch-swiss/dsp-js/src/models/admin/string-literal';
import { AppGlobal } from '@dsp-app/src/app/app-global';

@Component({
selector: 'app-description',
Expand Down Expand Up @@ -92,7 +93,7 @@ export class DescriptionComponent implements OnInit {

// returns the descriptions sorted by language
private sortDescriptionsByLanguage(descriptions: StringLiteral[]): StringLiteral[] {
const languageOrder = ['en', 'de', 'fr', 'it', 'rm'];
const languageOrder = AppGlobal.languagesList.map((l) => l.language);

return descriptions.sort((a, b) => {
const indexA = languageOrder.indexOf(a.language);
Expand Down

0 comments on commit 0bdbb72

Please sign in to comment.