chore: set default memo visibility

This commit is contained in:
Steven
2022-08-19 21:59:50 +08:00
parent d5b88775d9
commit 2f33eceada
9 changed files with 43 additions and 12 deletions

View File

@ -60,11 +60,16 @@ const Memo: React.FC<Props> = (props: Props) => {
});
}
let intervalFlag = -1;
if (Date.now() - memo.createdTs < 1000 * 60 * 60 * 24) {
setInterval(() => {
intervalFlag = setInterval(() => {
setCreatedAtStr(getFormatedMemoCreatedAtStr(memo.createdTs, locale));
}, 1000 * 1);
}
return () => {
clearInterval(intervalFlag);
};
}, [locale]);
const handleShowMemoStoryDialog = () => {