From 820d510d15f097027eb664163ed8492556560468 Mon Sep 17 00:00:00 2001 From: Marcel <79279756+aofn@users.noreply.github.com> Date: Tue, 5 Dec 2023 16:12:57 +0100 Subject: [PATCH] fix: prevent reload when changing join rule --- pages/explore/manage-room/ChangeJoinRule.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/explore/manage-room/ChangeJoinRule.js b/pages/explore/manage-room/ChangeJoinRule.js index eeef720b..1f74eb51 100644 --- a/pages/explore/manage-room/ChangeJoinRule.js +++ b/pages/explore/manage-room/ChangeJoinRule.js @@ -25,7 +25,8 @@ const JoinRuleChanger = ({ roomId, roomName, onCancel }) => { const [errorMessage, setErrorMessage] = useState(''); const { t } = useTranslation('explore'); - const handleChangeJoinRule = async () => { + const handleChangeJoinRule = async (e) => { + e.preventDefault(); setChangingJoinRule(true); await matrixClient.sendStateEvent(roomId, 'm.room.join_rules', {}, { join_rule: joinRule }) .catch((error) => {