From d7cdf938e787b5e3b50b8ce645c8310942814ad5 Mon Sep 17 00:00:00 2001 From: greatsamist Date: Thu, 8 Aug 2024 10:06:30 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20support=20form=20image=20b?= =?UTF-8?q?ug=20and=20telegram=20bot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/components/misc/Support/SupportForm.tsx | 4 ++-- packages/app/components/misc/Support/index.tsx | 13 ++++++++----- packages/app/components/misc/form/imageUpload.tsx | 7 +++++-- packages/app/lib/actions/support.ts | 9 +++++++++ packages/app/lib/services/supportService.tsx | 8 +++++++- packages/server/src/services/support.service.ts | 8 ++++---- 6 files changed, 35 insertions(+), 14 deletions(-) diff --git a/packages/app/components/misc/Support/SupportForm.tsx b/packages/app/components/misc/Support/SupportForm.tsx index 4a96c9ac4..630c991fe 100644 --- a/packages/app/components/misc/Support/SupportForm.tsx +++ b/packages/app/components/misc/Support/SupportForm.tsx @@ -96,8 +96,8 @@ const SupportForm = ({ { const [isLoading, setIsLoading] = useState(false); const [messageSent, setMessageSent] = useState(false); const { authenticated } = usePrivy(); + const { address } = useAccount(); const [open, setOpen] = useState(false); const form = useForm>({ resolver: zodResolver(supportSchema), @@ -40,6 +41,7 @@ const Support = () => { toast.error('No wallet address found'); return; } + createSupportTicketAction({ ...values, }) @@ -60,9 +62,10 @@ const Support = () => { setMessageSent(false); setOpen(false); }; + return ( - + Contact Support
{messageSent &&

Message sent 🎉!!

} @@ -88,10 +91,10 @@ const Support = () => {

- {!authenticated ? ( + {!authenticated || !!address ? (

Sign in to send us a message

- +
) : messageSent ? (
diff --git a/packages/app/components/misc/form/imageUpload.tsx b/packages/app/components/misc/form/imageUpload.tsx index e279705d7..d0226f3a7 100644 --- a/packages/app/components/misc/form/imageUpload.tsx +++ b/packages/app/components/misc/form/imageUpload.tsx @@ -12,6 +12,7 @@ import { Dialog, DialogContent, DialogFooter, + DialogTitle, DialogTrigger, } from '@/components/ui/dialog'; import { Button } from '@/components/ui/button'; @@ -44,8 +45,10 @@ const ConfirmImageDeletion: React.FC = ({ className="absolute right-2 top-2 z-10 cursor-pointer rounded-full border border-muted-foreground bg-white text-muted-foreground" /> - -

Are you sure you want to remove this image?

+ + + Delete Image +

Are you sure you want to delete this image?