|
|
@@ -19,10 +19,13 @@ const CustomBotWithProxySettings = (props) => {
|
|
|
const [integrationIdToDelete, setIntegrationIdToDelete] = useState(null);
|
|
|
const { t } = useTranslation();
|
|
|
|
|
|
- const workspaceNameObjects = Object.values(connectionStatuses);
|
|
|
- const workspaceNames = workspaceNameObjects.map((w) => {
|
|
|
- return w.workspaceName;
|
|
|
- });
|
|
|
+ let workspaceNames;
|
|
|
+ if (connectionStatuses != null) {
|
|
|
+ const workspaceNameObjects = Object.values(connectionStatuses);
|
|
|
+ workspaceNames = workspaceNameObjects.map((w) => {
|
|
|
+ return w.workspaceName;
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
useEffect(() => {
|
|
|
if (proxyServerUri != null) {
|
|
|
@@ -132,7 +135,7 @@ const CustomBotWithProxySettings = (props) => {
|
|
|
{t('admin:slack_integration.delete')}
|
|
|
</button>
|
|
|
</div>
|
|
|
- <div>No.{i + 1} {workspaceNames[i] == null && <span className="text-danger">{t('admin:slack_integration.integration_failed')}</span>}</div>
|
|
|
+ {workspaceNames[i] == null && (<>Settings #{i + 1} <span className="text-danger">{t('admin:slack_integration.integration_failed')}</span></>)}
|
|
|
<WithProxyAccordions
|
|
|
botType="customBotWithProxy"
|
|
|
slackAppIntegrationId={slackAppIntegration._id}
|
|
|
@@ -167,6 +170,7 @@ const CustomBotWithProxySettingsWrapper = withUnstatedContainers(CustomBotWithPr
|
|
|
|
|
|
CustomBotWithProxySettings.defaultProps = {
|
|
|
slackAppIntegrations: [],
|
|
|
+ connectionStatuses: null,
|
|
|
};
|
|
|
|
|
|
CustomBotWithProxySettings.propTypes = {
|