1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
Zhiyuan Zheng
2021-04-01 18:39:53 +02:00
parent 5a45e1d0dc
commit cf33c52e49
3 changed files with 21 additions and 5 deletions

View File

@ -195,7 +195,7 @@ const ScreenCompose: React.FC<ScreenComposeProp> = ({
const autoSave = composeState.dirty
? setInterval(() => {
saveDraft()
}, 2000)
}, 1000)
: removeDraft()
return () => autoSave && clearInterval(autoSave)
}, [composeState])