From dd44d46a154759a4f8c9713584bf3692d3293a73 Mon Sep 17 00:00:00 2001 From: cosa65 Date: Tue, 26 Jul 2022 08:42:27 -0300 Subject: [PATCH] Disable Updates option for hms --- src/pages/settings/profile/index.jsx | 40 +++++++++++++++++----------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/src/pages/settings/profile/index.jsx b/src/pages/settings/profile/index.jsx index ab2719d3c5..4fecf30dca 100644 --- a/src/pages/settings/profile/index.jsx +++ b/src/pages/settings/profile/index.jsx @@ -1,10 +1,12 @@ import React, { useState } from 'react'; import Auth from '@aws-amplify/auth'; +import nextConfig from 'next/config'; import _ from 'lodash'; import { Form, Input, Empty, Row, Col, Button, Space, Checkbox, Typography, } from 'antd'; import { useRouter } from 'next/router'; + import Header from 'components/Header'; import endUserMessages from 'utils/endUserMessages'; import pushNotificationMessage from 'utils/pushNotificationMessage'; @@ -12,6 +14,10 @@ import handleError from 'utils/http/handleError'; import { useSelector, useDispatch } from 'react-redux'; import { loadUser } from 'redux/actions/user'; +import { AccountId } from 'utils/deploymentInfo'; + +const accountId = nextConfig()?.publicRuntimeConfig?.accountId; + const { Text } = Typography; const ProfileSettings = () => { @@ -123,22 +129,24 @@ const ProfileSettings = () => { - - - setChanges({ - changedUserAttributes: { [agreedEmailsKey]: e.target.checked.toString() }, - })} - /> - - I agree to receive updates about new features in Cellenics, research done with Cellenics, and Cellenics community events. (No external marketing.) - - - - + {accountId !== AccountId.HMS + && ( + + + setChanges({ + changedUserAttributes: { [agreedEmailsKey]: e.target.checked.toString() }, + })} + /> + + I agree to receive updates about new features in Cellenics, research done with Cellenics, and Cellenics community events. (No external marketing.) + + + + )}

Password settings: