@@ -37,7 +37,7 @@ export default function ffLockDuration({ ibff, veIBFF, veIBFFOld }) {
37
37
} , [ ] ) ;
38
38
39
39
useEffect ( ( ) => {
40
- if ( veIBFF . vestingInfo . lockEnds ) {
40
+ if ( veIBFF && veIBFF . vestingInfo && veIBFF . vestingInfo . lockEnds ) {
41
41
setSelectedDate ( moment . unix ( veIBFF . vestingInfo . lockEnds ) . format ( 'YYYY-MM-DD' ) )
42
42
setSelectedValue ( null )
43
43
}
@@ -67,7 +67,7 @@ export default function ffLockDuration({ ibff, veIBFF, veIBFFOld }) {
67
67
break ;
68
68
default :
69
69
}
70
- const newDate = moment . unix ( veIBFF . vestingInfo . lockEnds ) . add ( days , 'days' ) . format ( 'YYYY-MM-DD' ) ;
70
+ const newDate = moment ( ) . add ( days , 'days' ) . format ( 'YYYY-MM-DD' ) ;
71
71
72
72
setSelectedDate ( newDate ) ;
73
73
}
@@ -98,12 +98,15 @@ export default function ffLockDuration({ ibff, veIBFF, veIBFFOld }) {
98
98
shrink : true ,
99
99
} }
100
100
/>
101
- < RadioGroup className = { classes . vestPeriodToggle } row aria-label = "position" name = "position" onChange = { handleChange } value = { selectedValue } >
102
- < FormControlLabel value = "week" control = { < Radio color = "primary" /> } label = "1 week" labelPlacement = "left" />
103
- < FormControlLabel value = "month" control = { < Radio color = "primary" /> } label = "1 month" labelPlacement = "left" />
104
- < FormControlLabel value = "year" control = { < Radio color = "primary" /> } label = "1 year" labelPlacement = "left" />
105
- < FormControlLabel value = "years" control = { < Radio color = "primary" /> } label = "4 years" labelPlacement = "left" />
106
- </ RadioGroup >
101
+ < div className = { classes . inline } >
102
+ < Typography className = { classes . expiresIn } > Expires in </ Typography >
103
+ < RadioGroup className = { classes . vestPeriodToggle } row aria-label = "position" name = "position" onChange = { handleChange } value = { selectedValue } >
104
+ < FormControlLabel value = "week" control = { < Radio color = "primary" /> } label = "1 week" labelPlacement = "left" />
105
+ < FormControlLabel value = "month" control = { < Radio color = "primary" /> } label = "1 month" labelPlacement = "left" />
106
+ < FormControlLabel value = "year" control = { < Radio color = "primary" /> } label = "1 year" labelPlacement = "left" />
107
+ < FormControlLabel value = "years" control = { < Radio color = "primary" /> } label = "4 years" labelPlacement = "left" />
108
+ </ RadioGroup >
109
+ </ div >
107
110
</ div >
108
111
</ div >
109
112
</ Grid >
0 commit comments