Fix adding new relay

This commit is contained in:
Angelina Filippova 2020-08-19 00:53:02 +03:00
parent 04c10cf5e6
commit 7e72078f29
2 changed files with 2 additions and 1 deletions

View file

@ -13,7 +13,7 @@ const relays = {
state.fetchedRelays = relays
},
ADD_RELAY: (state, relay) => {
state.fetchedRelays = [...state.fetchedRelays, relay]
state.fetchedRelays = [...state.fetchedRelays, { actor: relay }]
},
DELETE_RELAY: (state, relay) => {
state.fetchedRelays = state.fetchedRelays.filter(fetchedRelay => fetchedRelay !== relay)

View file

@ -53,6 +53,7 @@ export default {
methods: {
followRelay() {
this.$store.dispatch('AddRelay', this.newRelay)
this.newRelay = ''
},
deleteRelay(relay) {
this.$store.dispatch('DeleteRelay', relay)