File tree Expand file tree Collapse file tree
packages/web/src/app/(app)/settings/license Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11'use client' ;
22
33import { useCallback , useState } from "react" ;
4- import { Download , Loader2 } from "lucide-react" ;
5- import { Button } from "@/components/ui/button" ;
4+ import { Download } from "lucide-react" ;
5+ import { LoadingButton } from "@/components/ui/loading- button" ;
66import { useToast } from "@/components/hooks/use-toast" ;
77import { isServiceError } from "@/lib/utils" ;
88import { getServicePingHistory } from "./actions" ;
@@ -48,18 +48,14 @@ export function DownloadServicePingHistoryButton() {
4848 } , [ toast ] ) ;
4949
5050 return (
51- < Button
51+ < LoadingButton
5252 variant = "outline"
5353 size = "sm"
5454 onClick = { handleDownload }
55- disabled = { isLoading }
55+ loading = { isLoading }
5656 >
57- { isLoading ? (
58- < Loader2 className = "h-3.5 w-3.5 animate-spin" />
59- ) : (
60- < Download className = "h-3.5 w-3.5" />
61- ) }
57+ { ! isLoading && < Download className = "h-3.5 w-3.5" /> }
6258 Download usage report
63- </ Button >
59+ </ LoadingButton >
6460 ) ;
6561}
You can’t perform that action at this time.
0 commit comments