|
3 | 3 | <nav-bar></nav-bar> |
4 | 4 | <div class="notifications"> |
5 | 5 | <notification |
6 | | - v-for="item in notifications" |
7 | | - :key="item.id" |
8 | | - :msg="item.msg" |
9 | | - @dismiss="removeNotification(item.id)"></notification> |
| 6 | + v-for="item in notifications" |
| 7 | + :key="item.id" |
| 8 | + :msg="item.msg" |
| 9 | + @dismiss="removeNotification(item.id)" |
| 10 | + ></notification> |
10 | 11 | </div> |
11 | 12 | <router-view></router-view> |
12 | 13 | <site-footer v-if="shouldShowFooter"></site-footer> |
13 | 14 | </div> |
14 | 15 | </template> |
15 | 16 |
|
16 | 17 | <script> |
17 | | -import { mapState, mapMutations } from 'vuex' |
18 | | -import values from 'lodash/values' |
19 | | -
|
20 | | -import NavBar from './components/nav-bar.vue' |
21 | | -import Notification from './components/notification.vue' |
22 | | -import SiteFooter from './components/site-footer.vue' |
| 18 | +import { mapState, mapMutations } from "vuex"; |
| 19 | +import values from "lodash/values"; |
23 | 20 |
|
| 21 | +import NavBar from "./components/nav-bar.vue"; |
| 22 | +import Notification from "./components/notification.vue"; |
| 23 | +import SiteFooter from "./components/site-footer.vue"; |
24 | 24 |
|
25 | 25 | export default { |
26 | 26 | computed: { |
27 | 27 | ...mapState({ |
28 | 28 | notifications: (state) => values(state.notifications), |
29 | | - pendingRequests: (state) => Object.keys(state.pendingRequests || []) |
| 29 | + pendingRequests: (state) => Object.keys(state.pendingRequests || []), |
30 | 30 | }), |
31 | | - isLoading () { |
32 | | - const routeName = this.$route && this.$route.name |
33 | | - return (this.pendingRequests.length > 0) && (routeName !== 'splash') |
| 31 | + isLoading() { |
| 32 | + const routeName = this.$route && this.$route.name; |
| 33 | + return this.pendingRequests.length > 0 && routeName !== "splash"; |
| 34 | + }, |
| 35 | + shouldShowFooter() { |
| 36 | + const routeName = this.$route && this.$route.name; |
| 37 | + return routeName !== "city-map"; |
34 | 38 | }, |
35 | | - shouldShowFooter () { |
36 | | - const routeName = this.$route && this.$route.name |
37 | | - return routeName !== 'city-map' |
38 | | - } |
39 | 39 | }, |
40 | 40 | methods: mapMutations({ |
41 | | - removeNotification: 'REMOVE_NOTIFICATION' |
| 41 | + removeNotification: "REMOVE_NOTIFICATION", |
42 | 42 | }), |
43 | 43 | components: { |
44 | | - 'nav-bar': NavBar, |
45 | | - 'notification': Notification, |
46 | | - 'site-footer': SiteFooter |
47 | | - } |
48 | | -} |
| 44 | + "nav-bar": NavBar, |
| 45 | + notification: Notification, |
| 46 | + "site-footer": SiteFooter, |
| 47 | + }, |
| 48 | +}; |
49 | 49 | </script> |
50 | 50 |
|
51 | 51 | <style lang="sass"> |
|
0 commit comments