/ Fixed the scope of the nest-loader component

This commit is contained in:
Alexis
2021-03-29 09:33:08 +02:00
parent 6402011ee0
commit 9fca291603
3 changed files with 60 additions and 74 deletions

View File

@@ -6,15 +6,7 @@
</h1>
</header>
<div class="section-content">
<div v-if="error">
Une erreur est survenue : {{ error }}
</div>
<div v-if="celestials.length > 1">
<celestials-list :celestials="celestials" />
</div>
<div v-else>
<nest-loader />
</div>
<celestials-list :celestials="celestials" />
</div>
</section>
</template>
@@ -24,20 +16,16 @@
import { fetchCelestials } from '@/api/le-systeme-solaire'
// Global methods
import CelestialsList from '@/components/celestials/CelestialsList.vue'
import NestLoader from '@/components/NestLoader.vue'
export default {
name: 'Celestials',
components: {
CelestialsList,
NestLoader
CelestialsList
},
data () {
return {
celestials: [],
error: ''
celestials: []
}
},