Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 30-minute refresh interval option #228

Merged
merged 1 commit into from
May 9, 2024
Merged

Conversation

duyet
Copy link
Owner

@duyet duyet commented May 8, 2024

Related to #227

Adds a new 30-minute refresh interval option to the ReloadButton component in components/reload-button.tsx.

  • Introduces a DropdownMenuItem for a 30-minute (1800000 milliseconds) refresh interval, allowing users to select this new option for auto-refreshing the page.

For more details, open the Copilot Workspace session.

Copy link

vercel bot commented May 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clickhouse-monitoring ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 8, 2024 2:08pm

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @duyet - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

Comment on lines +90 to +91
<DropdownMenuItem onClick={() => setReloadInterval(1800000)}>
30m
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (code_refinement): Consider using a constant for the reload interval value.

Using a constant for the interval value (e.g., const THIRTY_MINUTES = 1800000;) would improve readability and maintainability of the code.

Suggested change
<DropdownMenuItem onClick={() => setReloadInterval(1800000)}>
30m
const THIRTY_MINUTES = 1800000;
<DropdownMenuItem onClick={() => setReloadInterval(THIRTY_MINUTES)}>
30m
</DropdownMenuItem>

@duyet duyet merged commit 6cb739f into main May 9, 2024
14 checks passed
@duyet duyet deleted the chore/add-30min-refresh branch May 9, 2024 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant