diff --git a/frontend/src/views/admin/DashboardPage/RateLimitPanel.tsx b/frontend/src/views/admin/DashboardPage/RateLimitPanel.tsx index 0868367dd..a3c39e7e4 100644 --- a/frontend/src/views/admin/DashboardPage/RateLimitPanel.tsx +++ b/frontend/src/views/admin/DashboardPage/RateLimitPanel.tsx @@ -3,7 +3,7 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { z } from "zod"; import { createNotification } from "@app/components/notifications"; -import { Button, FormControl, Input } from "@app/components/v2"; +import { Button, ContentLoader, FormControl, Input } from "@app/components/v2"; import { useGetRateLimit, useUpdateRateLimit } from "@app/hooks/api"; const formSchema = z.object({ @@ -20,7 +20,7 @@ const formSchema = z.object({ type TRateLimitForm = z.infer; export const RateLimitPanel = () => { - const { data: rateLimit } = useGetRateLimit(); + const { data: rateLimit, isLoading } = useGetRateLimit(); const { mutateAsync: updateRateLimit } = useUpdateRateLimit(); const { @@ -78,7 +78,9 @@ export const RateLimitPanel = () => { } }; - return ( + return isLoading ? ( + + ) : (