diff options
| author | MohamedBassem <me@mbassem.com> | 2024-02-16 21:26:24 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-02-17 11:49:39 +0000 |
| commit | 9235e9a6fbb364713105137b6bf5bba9d81ecd4c (patch) | |
| tree | 80bc7871ca2b043c110c61b796c46af91cb26e2f /packages/web/app/dashboard/bookmarks/components/AddLink.tsx | |
| parent | 6febe13b3f4ad4eff3f205ece445b3577255bf41 (diff) | |
| download | karakeep-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.tsx | 6 |
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> |
