diff --git a/web/selectors/nav-selectors.js b/web/selectors/nav-selectors.js --- a/web/selectors/nav-selectors.js +++ b/web/selectors/nav-selectors.js @@ -11,7 +11,7 @@ import type { AppState } from '../redux/redux-setup.js'; import { type WebNavigationTab, - type NavigationSettingsSection, + type WebNavigationSettingsSection, } from '../types/nav-types.js'; const dateExtractionRegex = /^([0-9]{4})-([0-9]{2})-[0-9]{2}$/; @@ -123,7 +123,7 @@ function navSettingsSectionSelector( state: AppState, -): ?NavigationSettingsSection { +): ?WebNavigationSettingsSection { return state.navInfo.settingsSection; } diff --git a/web/settings/user-settings-list-item.react.js b/web/settings/user-settings-list-item.react.js --- a/web/settings/user-settings-list-item.react.js +++ b/web/settings/user-settings-list-item.react.js @@ -6,10 +6,10 @@ import css from './user-settings-list-item.css'; import { useSelector } from '../redux/redux-utils.js'; import { navSettingsSectionSelector } from '../selectors/nav-selectors.js'; -import type { NavigationSettingsSection } from '../types/nav-types.js'; +import type { WebNavigationSettingsSection } from '../types/nav-types.js'; type Props = { - +id: NavigationSettingsSection, + +id: WebNavigationSettingsSection, +name: string, +onClick: () => mixed, }; diff --git a/web/types/nav-types.js b/web/types/nav-types.js --- a/web/types/nav-types.js +++ b/web/types/nav-types.js @@ -17,13 +17,13 @@ export type WebLoginMethod = 'form' | 'qr-code'; const webLoginMethodValidator = t.enums.of(['form', 'qr-code']); -export type NavigationSettingsSection = +export type WebNavigationSettingsSection = | 'account' | 'friend-list' | 'block-list' | 'keyservers' | 'danger-zone'; -const navigationSettingsSectionValidator = t.enums.of([ +const webNavigationSettingsSectionValidator = t.enums.of([ 'account', 'friend-list', 'block-list', @@ -39,7 +39,7 @@ +tab: WebNavigationTab, +activeChatThreadID: ?string, +pendingThread?: ThreadInfo, - +settingsSection?: NavigationSettingsSection, + +settingsSection?: WebNavigationSettingsSection, +selectedUserList?: $ReadOnlyArray, +chatMode?: NavigationChatMode, +inviteSecret?: ?string, @@ -52,7 +52,7 @@ tab: webNavigationTabValidator, activeChatThreadID: t.maybe(tID), pendingThread: t.maybe(threadInfoValidator), - settingsSection: t.maybe(navigationSettingsSectionValidator), + settingsSection: t.maybe(webNavigationSettingsSectionValidator), selectedUserList: t.maybe(t.list(accountUserInfoValidator)), chatMode: t.maybe(navigationChatModeValidator), inviteSecret: t.maybe(t.String),