diff --git a/web/sidebar/settings-switcher.react.js b/web/sidebar/settings-switcher.react.js index 330b4f2c4..aedebdb18 100644 --- a/web/sidebar/settings-switcher.react.js +++ b/web/sidebar/settings-switcher.react.js @@ -1,26 +1,40 @@ // @flow import * as React from 'react'; +import { useDispatch } from 'react-redux'; +import { updateNavInfoActionType } from '../types/nav-types'; import NavigationPanel from './navigation-panel.react'; function SettingsSwitcher(): React.Node { + const dispatch = useDispatch(); + const onClickAccountSettings = React.useCallback( + (event: SyntheticEvent) => { + event.preventDefault(); + dispatch({ + type: updateNavInfoActionType, + payload: { tab: 'settings', settingsSection: 'account' }, + }); + }, + [dispatch], + ); + const accountSettingsNavigationItem = React.useMemo( () => (

- My Account + My Account

), - [], + [onClickAccountSettings], ); return ( {accountSettingsNavigationItem} ); } export default SettingsSwitcher;