mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-20 03:42:10 +03:00
set scedule date to null when schedule status changed
This commit is contained in:
parent
31ee6ef52f
commit
16f4e2c453
@ -87,9 +87,12 @@ const PostOptionsModal = forwardRef(({
|
||||
},[scheduledFor])
|
||||
|
||||
useEffect(() => {
|
||||
if(scheduledForDate){
|
||||
if (scheduledForDate) {
|
||||
setScheduleLater(true);
|
||||
setScheduledFor(scheduledForDate);
|
||||
} else {
|
||||
setScheduleLater(false);
|
||||
setScheduledFor('');
|
||||
}
|
||||
},[scheduledForDate])
|
||||
|
||||
@ -155,8 +158,11 @@ const PostOptionsModal = forwardRef(({
|
||||
intl.formatMessage({id:"editor.scheduled_later"}),
|
||||
]}
|
||||
selectedOptionIndex={scheduleLater ? 1 : 0}
|
||||
handleOnChange={(index)=>{
|
||||
setScheduleLater(index === 1)
|
||||
handleOnChange={(index)=> {
|
||||
setScheduleLater(index === 1);
|
||||
if (index !== 1) {
|
||||
handleScheduleChange(null);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user