diff --git a/assets/scss/style.scss b/assets/scss/style.scss index e6d5eb8..d984a09 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -133,6 +133,10 @@ box-shadow: 0 0 64px 64px $color; } +.no-content-text { + color: $color__neutral-800; +} + .selected-indicator { @media (min-width: $bp__layout) { &::before { diff --git a/pages/galleries.vue b/pages/galleries.vue index 773cd1f..fe182b3 100644 --- a/pages/galleries.vue +++ b/pages/galleries.vue @@ -1,16 +1,21 @@ - - diff --git a/pages/services.vue b/pages/services.vue index 9b087ad..2f76d6e 100644 --- a/pages/services.vue +++ b/pages/services.vue @@ -1,6 +1,7 @@ @@ -87,10 +91,21 @@ export default { }, async asyncData ({ $axios }) { - let { services } = await $axios.$get('api/v1/services') - let { imageUrl } = await $axios.$get('api/v1/page/services') + try { + const { services } = await $axios.$get('api/v1/services') + let { imageUrl } = await $axios.$get('api/v1/page/services') - return { services, imageUrl } + if (!imageUrl) { + imageUrl = '/img/default-home.jpg' + } + + return { services, imageUrl } + } catch { + return { + services: [], + imageUrl: '/img/default-home.jpg', + } + } }, } @@ -251,5 +266,13 @@ export default { .preloader-overlay { z-index: 10; } + +.no-services { + display: flex; + align-items: center; + justify-content: center; + width: 100%; + text-align: center; +}