fix (dashboard): resolve rate limit query (#2845)
### **PR Type** Bug fix, Enhancement ___ ### **Description** - Removed the 'Auth' switch from the `AuthLimitingForm` component to simplify the settings interface. - Updated the rate limit query in `useGetRateLimits` hook to resolve by default, fixing a potential issue. - Added a changeset to document the fix for the rate limit query. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>AuthLimitingForm.tsx</strong><dd><code>Remove 'Auth' switch from AuthLimitingForm component</code> </dd></summary> <hr> dashboard/src/features/projects/rate-limiting/settings/components/AuthLimitingForm/AuthLimitingForm.tsx <li>Removed the 'Auth' switch from the settings container.<br> <li> Simplified the form component by removing unused props.<br> </details> </td> <td><a href="https://github.com/nhost/nhost/pull/2845/files#diff-cd300f74c3d921fde5b705b25f63e22a3e66dfb9182ca818102cb1a5f508eb5e">+0/-2</a> </td> </tr> </table></td></tr><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>useGetRateLimits.ts</strong><dd><code>Update rate limit query to resolve by default</code> </dd></summary> <hr> dashboard/src/features/projects/rate-limiting/settings/hooks/useGetRateLimits/useGetRateLimits.ts - Changed the 'resolve' variable to true in the rate limit query. </details> </td> <td><a href="https://github.com/nhost/nhost/pull/2845/files#diff-82e380da100404643bd31504d42eb4d27a406dd9e1cccffc17b9dbcb0df5e8fa">+1/-1</a> </td> </tr> </table></td></tr><tr><td><strong>Documentation</strong></td><td><table> <tr> <td> <details> <summary><strong>smooth-bears-confess.md</strong><dd><code>Add changeset for rate limit query fix</code> </dd></summary> <hr> .changeset/smooth-bears-confess.md - Added a changeset for the rate limit query fix. </details> </td> <td><a href="https://github.com/nhost/nhost/pull/2845/files#diff-7def3298a6278543c9953ddf387b04c552ddefc4cd5ad9217366c59926b3cf63">+5/-0</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: >Comment `/help` on the PR to get a list of all available PR-Agent tools and their descriptions --------- Co-authored-by: Hassan Ben Jobrane <hsanbenjobrane@gmail.com>
This commit is contained in:
5
.changeset/smooth-bears-confess.md
Normal file
5
.changeset/smooth-bears-confess.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@nhost/dashboard': minor
|
||||
---
|
||||
|
||||
fix: resolve rate limit query
|
||||
@@ -248,8 +248,6 @@ export default function AuthLimitingForm() {
|
||||
>
|
||||
<SettingsContainer
|
||||
title="Auth"
|
||||
switchId="enabled"
|
||||
showSwitch
|
||||
slotProps={{
|
||||
submitButton: {
|
||||
disabled: !formState.isDirty || maintenanceActive,
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function useGetRateLimits() {
|
||||
const { data, loading } = useGetRateLimitConfigQuery({
|
||||
variables: {
|
||||
appId: currentProject?.id,
|
||||
resolve: false,
|
||||
resolve: true,
|
||||
},
|
||||
skip: !currentProject,
|
||||
...(!isPlatform ? { client: localMimirClient } : {}),
|
||||
|
||||
Reference in New Issue
Block a user