2020-10-12 19:41:52 +02:00
|
|
|
<template>
|
|
|
|
<div class="steps">
|
2020-11-20 17:11:39 +01:00
|
|
|
<step v-for="(step, index) in getData" :key="index" :data="step" />
|
2020-10-12 19:41:52 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Step from '@/components/Step'
|
2020-10-21 21:45:22 +02:00
|
|
|
import { mapState } from 'vuex'
|
2020-10-12 19:41:52 +02:00
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
Step,
|
|
|
|
},
|
2020-10-21 21:45:22 +02:00
|
|
|
computed: {
|
|
|
|
...mapState('steps', ['steps']),
|
2020-11-20 17:11:39 +01:00
|
|
|
...mapState('airdrop', ['airdrops']),
|
|
|
|
getData() {
|
|
|
|
if (Array.isArray(this.airdrops)) {
|
|
|
|
return this.steps.map((step, index) => {
|
|
|
|
if (step.contract === 'Airdrop.sol') {
|
|
|
|
return {
|
|
|
|
...step,
|
|
|
|
airdrops: this.airdrops[index - this.airdrops.length + 2],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return step
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
return this.steps
|
|
|
|
},
|
2020-10-12 19:41:52 +02:00
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|