Skip to content

Commit

Permalink
fix: prevent reload when changing join rule
Browse files Browse the repository at this point in the history
  • Loading branch information
aofn committed Dec 5, 2023
1 parent 3c4f321 commit 820d510
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pages/explore/manage-room/ChangeJoinRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 820d510

Please sign in to comment.