- Removed useless comments
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
// API
|
// API
|
||||||
import { fetchCelestials } from '@/api/le-systeme-solaire'
|
import { fetchCelestials } from '@/api/le-systeme-solaire'
|
||||||
|
|
||||||
// Global methods
|
|
||||||
import CelestialsList from '@/components/celestials/CelestialsList.vue'
|
import CelestialsList from '@/components/celestials/CelestialsList.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -23,6 +22,7 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
CelestialsList
|
CelestialsList
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
celestials: []
|
celestials: []
|
||||||
|
|||||||
@@ -31,10 +31,8 @@ export const actions = {
|
|||||||
toggleFav: ({ commit, getters }, celestialId) => {
|
toggleFav: ({ commit, getters }, celestialId) => {
|
||||||
// If the celestial is not faved
|
// If the celestial is not faved
|
||||||
if (!getters.isFav(celestialId)) {
|
if (!getters.isFav(celestialId)) {
|
||||||
// ... favs it
|
|
||||||
commit('addFav', celestialId)
|
commit('addFav', celestialId)
|
||||||
} else {
|
} else {
|
||||||
// ...else unfavs
|
|
||||||
commit('removeFav', celestialId)
|
commit('removeFav', celestialId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user