diff --git a/UI/dm.tsx b/UI/dm.tsx
index c9537a3..1b3da87 100644
--- a/UI/dm.tsx
+++ b/UI/dm.tsx
@@ -83,26 +83,13 @@ export function DirectMessageContainer(props: DirectMessageContainerProps) {
}
const currentEditor = props.currentEditor;
- let actions: JSX.Element | undefined;
+ let buttons = [];
if (currentEditor && IS_BETA_VERSION) {
- const canEditGroupProfile = props.isGroupMessage &&
- props.groupChatController.getGroupAdminCtx(currentEditor.pubkey);
- actions = canEditGroupProfile
- ? (
-
-
+ if (props.isGroupMessage) {
+ const canEditGroupProfile = props.groupChatController.getGroupAdminCtx(currentEditor.pubkey);
+ if (canEditGroupProfile) {
+ buttons.push(
+ // setting button
-
- )
- : (
-
-
-
+ ,
+ );
+ }
+ } else {
+ buttons.push(
+ ,
);
+ }
}
const vDom = (
@@ -173,7 +160,9 @@ export function DirectMessageContainer(props: DirectMessageContainerProps) {
props.currentEditor.pubkey.bech32()}
- {actions}
+
+ {buttons}
+
{messagePanel}