diff --git a/src/components/celestials/CelestialCard.vue b/src/components/celestials/CelestialCard.vue index c12b682..83af80c 100644 --- a/src/components/celestials/CelestialCard.vue +++ b/src/components/celestials/CelestialCard.vue @@ -34,6 +34,20 @@
+
+

+ Orbite autour de + + {{ celestial.aroundPlanet.planet }} + +

+

Facteur Gravité : {{ celestial.gravity }}

@@ -52,7 +66,12 @@
- Détails + + Détails +
diff --git a/src/router/index.ts b/src/router/index.ts index d404fab..7087f20 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -20,12 +20,12 @@ const routes: Array = [ }, { path: "/celestes", - name: "Célestes", + name: "CelesteAll", component: Celestials }, { path: "/celestes/:slug", - name: "Céleste", + name: "CelesteSingle", component: Celestial, props: true }, diff --git a/src/views/celestials/Celestial.vue b/src/views/celestials/Celestial.vue index aa900b0..c3d5cbc 100644 --- a/src/views/celestials/Celestial.vue +++ b/src/views/celestials/Celestial.vue @@ -1,13 +1,59 @@ diff --git a/src/views/celestials/Celestials.vue b/src/views/celestials/Celestials.vue index 9064497..744f357 100644 --- a/src/views/celestials/Celestials.vue +++ b/src/views/celestials/Celestials.vue @@ -15,7 +15,6 @@ import CelestialsList from "@/components/celestials/CelestialsList.vue"; // API import axios from "axios"; - // Global methods import { addCelestialType } from "@/plugins/methods"; @@ -32,20 +31,19 @@ export default defineComponent({ }; }, - async mounted() { + mounted() { // Fetches from API... - this.fetchBodies().then(res => { + this.fetchCelestials().then(res => { // ...and add type this.celestials = this.addType(res); }); - console.log(this.$options); }, methods: { /** * Fetches celestial bodies from API */ - fetchBodies(): Promise { + fetchCelestials(): Promise { return axios .get("https://api.le-systeme-solaire.net/rest/bodies/") .then(res => {