2018-03-29 01:57:00 -05:00
|
|
|
<template>
|
2018-03-30 14:31:09 -05:00
|
|
|
<div>
|
|
|
|
<app-navbar></app-navbar>
|
|
|
|
<section id="app" class="section">
|
|
|
|
<div class="container">
|
|
|
|
<router-view v-if="!hasError"></router-view>
|
|
|
|
<div v-else>
|
|
|
|
<h1>Error!</h1>
|
|
|
|
<p>{{error}}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
2018-03-29 01:57:00 -05:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
2018-03-30 14:31:09 -05:00
|
|
|
import { mapState } from "vuex";
|
|
|
|
import AppNavbar from "./AppNavbar";
|
|
|
|
|
2018-03-29 01:57:00 -05:00
|
|
|
export default {
|
2018-03-30 14:31:09 -05:00
|
|
|
computed: {
|
|
|
|
...mapState({
|
|
|
|
hasError: state => state.error !== null,
|
|
|
|
error: state => state.error
|
|
|
|
})
|
|
|
|
},
|
2018-03-29 01:57:00 -05:00
|
|
|
|
2018-03-30 14:31:09 -05:00
|
|
|
components: {
|
|
|
|
AppNavbar
|
|
|
|
}
|
2018-03-29 01:57:00 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|