mirror of
https://github.com/romancm/gamebrary
synced 2024-11-24 12:13:08 +00:00
move sortedBoards to getter
This commit is contained in:
parent
4606b34688
commit
2a82ca3a26
2 changed files with 3 additions and 6 deletions
|
@ -60,7 +60,6 @@
|
|||
|
||||
<script>
|
||||
import CreateBoard from '@/components/Board/CreateBoard';
|
||||
import orderby from 'lodash.orderby';
|
||||
|
||||
import { mapState, mapGetters } from 'vuex';
|
||||
|
||||
|
@ -77,11 +76,7 @@ export default {
|
|||
|
||||
computed: {
|
||||
...mapState(['boards', 'platforms', 'platformNames', 'wallpapers']),
|
||||
...mapGetters(['platformNames']),
|
||||
|
||||
sortedBoards() {
|
||||
return orderby(this.boards, 'name');
|
||||
},
|
||||
...mapGetters(['platformNames', 'sortedBoards']),
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
|
|
@ -11,6 +11,8 @@ export default {
|
|||
return platforms.filter(({ id }) => id !== state.platform.id && gamePlatforms.includes(id));
|
||||
},
|
||||
|
||||
sortedBoards: ({ boards }) => orderby(boards, 'name'),
|
||||
|
||||
filteredPlatforms: (state) => {
|
||||
const filterField = state.settings.platformsFilterField || null;
|
||||
const sortField = state.settings.platformsSortField || 'generation';
|
||||
|
|
Loading…
Reference in a new issue