From eda57dd8300a313dba833f2f6cccfcc93c0c5910 Mon Sep 17 00:00:00 2001 From: Brayden Zee Date: Tue, 31 Oct 2023 17:49:40 -0400 Subject: [PATCH] Add loading indicator to create module button (#329) * Add loading indicator to create module button * Fix formatting --------- Co-authored-by: Ahmed Elsakaan --- src/app/(dashboard)/_components/side-menu-modules.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app/(dashboard)/_components/side-menu-modules.tsx b/src/app/(dashboard)/_components/side-menu-modules.tsx index 59170f9c..32e48fff 100644 --- a/src/app/(dashboard)/_components/side-menu-modules.tsx +++ b/src/app/(dashboard)/_components/side-menu-modules.tsx @@ -194,7 +194,7 @@ const CreateModulePopover = () => { const utils = trpc.useUtils(); - const { mutateAsync } = trpc.module.post.create.useMutation({ + const { mutateAsync, isLoading } = trpc.module.post.create.useMutation({ onSuccess: async () => { await utils.module.get.all.invalidate(); }, @@ -362,7 +362,12 @@ const CreateModulePopover = () => { Color -