mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-20 11:51:52 +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])
|
},[scheduledFor])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if(scheduledForDate){
|
if (scheduledForDate) {
|
||||||
setScheduleLater(true);
|
setScheduleLater(true);
|
||||||
setScheduledFor(scheduledForDate);
|
setScheduledFor(scheduledForDate);
|
||||||
|
} else {
|
||||||
|
setScheduleLater(false);
|
||||||
|
setScheduledFor('');
|
||||||
}
|
}
|
||||||
},[scheduledForDate])
|
},[scheduledForDate])
|
||||||
|
|
||||||
@ -155,8 +158,11 @@ const PostOptionsModal = forwardRef(({
|
|||||||
intl.formatMessage({id:"editor.scheduled_later"}),
|
intl.formatMessage({id:"editor.scheduled_later"}),
|
||||||
]}
|
]}
|
||||||
selectedOptionIndex={scheduleLater ? 1 : 0}
|
selectedOptionIndex={scheduleLater ? 1 : 0}
|
||||||
handleOnChange={(index)=>{
|
handleOnChange={(index)=> {
|
||||||
setScheduleLater(index === 1)
|
setScheduleLater(index === 1);
|
||||||
|
if (index !== 1) {
|
||||||
|
handleScheduleChange(null);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user