Page MenuHomePhorge

D3343.1765339758.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D3343.1765339758.diff

diff --git a/web/sidebar/settings-switcher.react.js b/web/sidebar/settings-switcher.react.js
--- a/web/sidebar/settings-switcher.react.js
+++ b/web/sidebar/settings-switcher.react.js
@@ -1,17 +1,31 @@
// @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<HTMLAnchorElement>) => {
+ event.preventDefault();
+ dispatch({
+ type: updateNavInfoActionType,
+ payload: { tab: 'settings', settingsSection: 'account' },
+ });
+ },
+ [dispatch],
+ );
+
const accountSettingsNavigationItem = React.useMemo(
() => (
<p>
- <a>My Account</a>
+ <a onClick={onClickAccountSettings}>My Account</a>
</p>
),
- [],
+ [onClickAccountSettings],
);
return (

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 10, 4:09 AM (20 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5860685
Default Alt Text
D3343.1765339758.diff (1 KB)

Event Timeline