Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3296509
D3343.id10294.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3343.id10294.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 1:41 AM (20 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2532328
Default Alt Text
D3343.id10294.diff (1 KB)
Attached To
Mode
D3343: [web] Navigate to the settings on click
Attached
Detach File
Event Timeline
Log In to Comment