From 85230030283700eed8de63cc27734715b2d4ce9d Mon Sep 17 00:00:00 2001 From: Luke Watts Date: Fri, 17 Dec 2021 13:42:08 +0100 Subject: [PATCH] fix: hide user profile section The User Profile section has quite a lot of information which is tied to specifics of the original Precious Plastic deployment. The change here is a quick fix rather than a long term solution. Ideally the concept of user focus' can be removed from the code and made into an extensible object. --- src/pages/Settings/SettingsPage.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/pages/Settings/SettingsPage.tsx b/src/pages/Settings/SettingsPage.tsx index 35ee021224..6d79de332e 100644 --- a/src/pages/Settings/SettingsPage.tsx +++ b/src/pages/Settings/SettingsPage.tsx @@ -1,7 +1,8 @@ import * as React from 'react' import Flex from 'src/components/Flex' import { IUserPP } from 'src/models/user_pp.models' -import { UserStore } from 'src/stores/User/user.store' +import type { ThemeStore } from 'src/stores/Theme/theme.store' +import type { UserStore } from 'src/stores/User/user.store' import { observer, inject } from 'mobx-react' import { UserInfosSection } from './content/formSections/UserInfos.section' import { FocusSection } from './content/formSections/Focus.section' @@ -22,11 +23,13 @@ import INITIAL_VALUES from './Template' import { Box } from 'rebass/styled-components' import { Prompt } from 'react-router' import { toJS } from 'mobx' +import { isModuleSupported, MODULE } from 'src/modules' interface IProps {} interface IInjectedProps extends IProps { - userStore: UserStore + userStore: UserStore, + themeStore: ThemeStore } interface IState { @@ -183,7 +186,8 @@ export class UserSettings extends React.Component { {/* Note - for fields without fieldwrapper can just render via props method and bind to input */} - + {isModuleSupported(MODULE.MAP) && } + {/* Specific profile type fields */} {values.profileType === 'workspace' && ( @@ -237,9 +241,10 @@ export class UserSettings extends React.Component { maxWidth: ['100%', '100%', '400px'], }} > - + {isModuleSupported(MODULE.MAP) && ( - + )}