diff --git a/web/sidebar/community-picker.react.js b/web/sidebar/community-picker.react.js
index 20f1da61a..7fc00f918 100644
--- a/web/sidebar/community-picker.react.js
+++ b/web/sidebar/community-picker.react.js
@@ -1,29 +1,36 @@
// @flow
import * as React from 'react';
+import { useDispatch } from 'react-redux';
import Button from '../components/button.react';
-import UserSettingsModal from '../modals/account/user-settings-modal.react';
-import { useModalContext } from '../modals/modal-provider.react';
import SWMansionIcon from '../SWMansionIcon.react';
+import { updateNavInfoActionType } from '../types/nav-types.js';
import css from './community-picker.css';
function CommunityPicker(): React.Node {
- const { pushModal } = useModalContext();
+ const dispatch = useDispatch();
- const setModalToUserSettings = React.useCallback(() => {
- pushModal();
- }, [pushModal]);
+ const openAccountSettings = React.useCallback(
+ (event: SyntheticEvent) => {
+ event.preventDefault();
+ dispatch({
+ type: updateNavInfoActionType,
+ payload: { tab: 'settings', settingsSection: 'account' },
+ });
+ },
+ [dispatch],
+ );
return (
);
}
export default CommunityPicker;