From 1f954c106562bd79385248a3d1c119f5cbe48a9a Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 6 Jun 2024 01:10:21 +0100 Subject: [PATCH] Split ShareViaChatDialog (#4383) --- .../dms/dialogs/ShareViaChatDialog.tsx | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/src/components/dms/dialogs/ShareViaChatDialog.tsx b/src/components/dms/dialogs/ShareViaChatDialog.tsx index d353eebe..d2fefd33 100644 --- a/src/components/dms/dialogs/ShareViaChatDialog.tsx +++ b/src/components/dms/dialogs/ShareViaChatDialog.tsx @@ -15,8 +15,24 @@ export function SendViaChatDialog({ control: Dialog.DialogControlProps onSelectChat: (chatId: string) => void }) { - const {_} = useLingui() + return ( + + + + ) +} +function SendViaChatDialogInner({ + control, + onSelectChat, +}: { + control: Dialog.DialogControlProps + onSelectChat: (chatId: string) => void +}) { + const {_} = useLingui() const {mutate: createChat} = useGetConvoForMembers({ onSuccess: data => { onSelectChat(data.convo.id) @@ -39,15 +55,10 @@ export function SendViaChatDialog({ ) return ( - - - + ) }