We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 683df92 commit 66c26bbCopy full SHA for 66c26bb
src/components/links/download-all-links.tsx
@@ -2,7 +2,7 @@
2
3
import { downloadAllLinks } from "@/server/actions/links";
4
import { Button } from "@/ui/button";
5
-import { DownloadIcon } from "lucide-react";
+import { DownloadIcon, LoaderIcon } from "lucide-react";
6
import { useState } from "react";
7
import { toast } from "sonner";
8
@@ -37,8 +37,12 @@ const DownloadAllLinks = () => {
37
onClick={handleDownloadLinks}
38
disabled={isLoading}
39
>
40
- <DownloadIcon size={14} />
41
- <span>Export Links</span>
+ {isLoading ? (
+ <LoaderIcon className="animate-spin" size={14} />
42
+ ) : (
43
+ <DownloadIcon size={14} />
44
+ )}
45
+ <span>{isLoading ? "Exporting..." : "Export all links"}</span>
46
</Button>
47
);
48
};
0 commit comments