From 9235e9a6fbb364713105137b6bf5bba9d81ecd4c Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Fri, 16 Feb 2024 21:26:24 +0000
Subject: ui: Change action buttons to show a spinner when the request is
 loading

---
 packages/web/app/dashboard/bookmarks/components/AddLink.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'packages/web/app/dashboard/bookmarks/components/AddLink.tsx')

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>
-- 
cgit v1.2.3-70-g09d2

