<template>
  <block>
    <block v-if="user.PersonId">
      <slot v-bind:user="user"></slot>
    </block>
    <Loading v-else />
  </block>
</template>

<script>
import { mapState } from 'vuex'
import Loading from '@/components/Loading'

export default {
  name: 'BasicLayout',
  components: {
    Loading
  },
  computed: {
    ...mapState({
      user: s => s.user.UserInfo || {}
    })
  }
}
</script>
