diff --git a/src/components/status.jsx b/src/components/status.jsx index e1a5feba..f10f7ae3 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -1030,19 +1030,18 @@ function Status({ onClick={replyStatus} /> - {canBoost && ( -
- -
- )} +
+ +
{ - let timeout; - if (!expired && expiresAtDate) { - const ms = expiresAtDate.getTime() - Date.now() + 1; // +1 to give it a little buffer - if (ms > 0) { - timeout = setTimeout(() => { - setUIState('loading'); - (async () => { - await refresh(); - setUIState('default'); - })(); - }, ms); - } - } - return () => { - clearTimeout(timeout); - }; - }, [expired, expiresAtDate]); + // NOTE: Disable this because setTimeout runs immediately if delay is too large + // https://stackoverflow.com/a/56718027/20838 + // useEffect(() => { + // let timeout; + // if (!expired && expiresAtDate) { + // const ms = expiresAtDate.getTime() - Date.now() + 1; // +1 to give it a little buffer + // if (ms > 0) { + // timeout = setTimeout(() => { + // setUIState('loading'); + // (async () => { + // // await refresh(); + // setUIState('default'); + // })(); + // }, ms); + // } + // } + // return () => { + // clearTimeout(timeout); + // }; + // }, [expired, expiresAtDate]); const pollVotesCount = votersCount || votesCount; let roundPrecision = 0;