Commit 07c2433f authored by isstuev's avatar isstuev

fix time ago increment hook

parent fc07665d
...@@ -78,6 +78,8 @@ export default function useTimeAgoIncrement(ts: string | null, isEnabled?: boole ...@@ -78,6 +78,8 @@ export default function useTimeAgoIncrement(ts: string | null, isEnabled?: boole
isEnabled && startIncrement(); isEnabled && startIncrement();
!isEnabled && setValue(dayjs(ts).fromNow());
return () => { return () => {
timeouts.forEach(window.clearTimeout); timeouts.forEach(window.clearTimeout);
intervals.forEach(window.clearInterval); intervals.forEach(window.clearInterval);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment