From 99b1b6991f57fcf7b0b141490de758535938423e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Thu, 10 Oct 2024 23:38:46 +0200 Subject: [PATCH] pl-fe: disable mention hotkey when unauthenticated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- packages/pl-fe/src/actions/compose.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/pl-fe/src/actions/compose.ts b/packages/pl-fe/src/actions/compose.ts index 77ffd1bcf..883856b34 100644 --- a/packages/pl-fe/src/actions/compose.ts +++ b/packages/pl-fe/src/actions/compose.ts @@ -252,7 +252,9 @@ interface ComposeMentionAction { } const mentionCompose = (account: ComposeMentionAction['account']) => - (dispatch: AppDispatch) => { + (dispatch: AppDispatch, getState: () => RootState) => { + if (!getState().me) return; + const action: ComposeMentionAction = { type: COMPOSE_MENTION, composeId: 'compose-modal',