wait for user to be set before rendering dashboard

This commit is contained in:
Gamebrary 2020-10-09 11:11:47 -07:00
parent 90af0910b6
commit d707269850

View file

@ -1,5 +1,5 @@
<template lang="html"> <template lang="html">
<div fluid> <div fluid v-if="user">
<b-jumbotron <b-jumbotron
header="Gamebrary" header="Gamebrary"
header-level="5" header-level="5"
@ -17,6 +17,7 @@
<script> <script>
import PageFooter from '@/components/PageFooter'; import PageFooter from '@/components/PageFooter';
import Boards from '@/components/Boards'; import Boards from '@/components/Boards';
import { mapState } from 'vuex';
export default { export default {
components: { components: {
@ -32,6 +33,8 @@ export default {
}, },
computed: { computed: {
...mapState(['user']),
coverScreenshot() { coverScreenshot() {
const baseUrl = 'https://images.igdb.com/igdb/image/upload/t_1080p_2x/'; const baseUrl = 'https://images.igdb.com/igdb/image/upload/t_1080p_2x/';
return this.coverGame && this.coverGame.screenshots.length return this.coverGame && this.coverGame.screenshots.length