Skip to content

Commit

Permalink
Don't show App limit if reset time is already passed.
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdharmesh committed Feb 5, 2025
1 parent 900384d commit 6c07d36
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/js/components/TwitterAccounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ function TwitterUserRateLimits( { rate_limits: rateLimits } ) {
* @return {JSX.Element} The account rate limits.
*/
function TwitterAppRateLimits( { rate_limits: rateLimits } ) {
if (
! rateLimits ||
! rateLimits.app_limit_24hour_limit ||
rateLimits?.app_limit_24hour_reset < Math.floor( Date.now() / 1000 )
) {
return null;
}

return (
<div className="autoshare-for-twitter-rate-monitor__app">
<TwitterRateLimits
Expand Down

0 comments on commit 6c07d36

Please sign in to comment.