aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web/app/dashboard/bookmarks/components/AddLink.tsx
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-02-16 21:26:24 +0000
committerMohamedBassem <me@mbassem.com>2024-02-17 11:49:39 +0000
commit9235e9a6fbb364713105137b6bf5bba9d81ecd4c (patch)
tree80bc7871ca2b043c110c61b796c46af91cb26e2f /packages/web/app/dashboard/bookmarks/components/AddLink.tsx
parent6febe13b3f4ad4eff3f205ece445b3577255bf41 (diff)
downloadkarakeep-9235e9a6fbb364713105137b6bf5bba9d81ecd4c.tar.zst
ui: Change action buttons to show a spinner when the request is loading
Diffstat (limited to 'packages/web/app/dashboard/bookmarks/components/AddLink.tsx')
-rw-r--r--packages/web/app/dashboard/bookmarks/components/AddLink.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/web/app/dashboard/bookmarks/components/AddLink.tsx b/packages/web/app/dashboard/bookmarks/components/AddLink.tsx
index 34f043e7..0ef4d193 100644
--- a/packages/web/app/dashboard/bookmarks/components/AddLink.tsx
+++ b/packages/web/app/dashboard/bookmarks/components/AddLink.tsx
@@ -1,6 +1,5 @@
"use client";
-import { Button } from "@/components/ui/button";
import { Form, FormControl, FormField, FormItem } from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { Plus } from "lucide-react";
@@ -10,6 +9,7 @@ import { z } from "zod";
import { zodResolver } from "@hookform/resolvers/zod";
import { toast } from "@/components/ui/use-toast";
import { api } from "@/lib/trpc";
+import { ActionButton } from "@/components/ui/action-button";
const formSchema = z.object({
url: z.string().url({ message: "The link must be a valid URL" }),
@@ -62,9 +62,9 @@ export default function AddLink() {
);
}}
/>
- <Button type="submit">
+ <ActionButton type="submit" loading={bookmarkLinkMutator.isPending}>
<Plus />
- </Button>
+ </ActionButton>
</div>
</form>
</Form>