Skip to content

Commit e8bbbaa

Browse files
feedback
1 parent 222b07a commit e8bbbaa

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

packages/web/src/app/(app)/settings/license/downloadServicePingHistoryButton.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use client';
22

33
import { 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";
66
import { useToast } from "@/components/hooks/use-toast";
77
import { isServiceError } from "@/lib/utils";
88
import { 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
}

0 commit comments

Comments
 (0)