Skip to content
This repository was archived by the owner on Oct 8, 2022. It is now read-only.

Commit a703d62

Browse files
committed
fixed payout banner
1 parent 6ee0bcc commit a703d62

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

dashboard/src/components/staking/Payouts/PayoutBanner.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<b-tabs type="is-toggle" class="payout-banner__tabs" :value="value" @input="updateSelectedEra">
3+
<b-tabs type="is-toggle" class="payout-banner__tabs" @input="updateSelectedEra">
44
<b-tab-item v-for="(era, index) in availableEras" :key="index" :label="era.text" />
55
</b-tabs>
66
<!-- <b-button disabled type="is-primary is-light">Payout All</b-button> -->
@@ -14,10 +14,12 @@ import { EraSelection } from './utils';
1414
@Component({})
1515
export default class PayoutBanner extends Vue {
1616
@Prop() public availableEras!: EraSelection[];
17-
@Prop({ default: 0 }) public value!: number;
17+
@Prop() public value!: number;
1818
1919
@Emit('input')
2020
updateSelectedEra(selectedEra: number) {
21+
console.log(selectedEra);
22+
2123
return selectedEra;
2224
}
2325
}

dashboard/src/components/staking/Payouts/Payouts.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export default class Payouts extends Vue {
6262
}
6363
6464
public eraAt(index: number): number {
65-
return this.eraSelection[index].value
65+
return this.eraSelection[index]?.value
6666
}
6767
6868
get hasOwnValidators(): boolean {

0 commit comments

Comments
 (0)