diff --git a/app/components/words/greek-text.hbs b/app/components/words/greek-text.hbs index d899541..4443a6d 100644 --- a/app/components/words/greek-text.hbs +++ b/app/components/words/greek-text.hbs @@ -1,5 +1,5 @@
- {{#each @model as |word|}} + {{#each this.sortedWords as |word|}} {{/each}}
\ No newline at end of file diff --git a/app/components/words/greek-text.js b/app/components/words/greek-text.js new file mode 100644 index 0000000..bb192f0 --- /dev/null +++ b/app/components/words/greek-text.js @@ -0,0 +1,7 @@ +import Component from '@glimmer/component'; +import { sort } from '@ember/object/computed'; + +export default class WordsGreekTextComponent extends Component { + sortDefinition = ['ogntSort']; + @sort('args.model', 'sortDefinition') sortedWords; +} diff --git a/app/components/words/ulb-text.js b/app/components/words/ulb-text.js new file mode 100644 index 0000000..d53182d --- /dev/null +++ b/app/components/words/ulb-text.js @@ -0,0 +1,7 @@ +import Component from '@glimmer/component'; +import { sort } from '@ember/object/computed'; + +export default class WordsUlbTextComponent extends Component { + sortDefinition = ['ulbSort']; + @sort('args.model', 'sortDefinition') sortedWords; +}