fix board placeholder

This commit is contained in:
Gamebrary 2020-08-24 21:24:02 -07:00
parent a16eaf3c27
commit 1c03353bc9

View file

@ -33,8 +33,20 @@ export default {
Placeholder,
},
data() {
return {
board: {},
};
},
computed: {
...mapState(['board']),
...mapState(['boards']),
},
mounted() {
const boardId = this.$route.params.id;
this.board = this.boards.find(({ id }) => id === boardId);
},
};
</script>