From 305b6aefb9385b7fe927b7b074828982d2ef8a26 Mon Sep 17 00:00:00 2001 From: Wang Sijie Date: Wed, 16 Mar 2022 16:20:24 +0800 Subject: [PATCH] fix(console): change status component type (#398) --- packages/console/src/components/Status/index.tsx | 2 +- packages/console/src/pages/ConnectorDetails/index.tsx | 2 +- .../console/src/pages/Connectors/components/ConnectorRow.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/console/src/components/Status/index.tsx b/packages/console/src/components/Status/index.tsx index 7a5e3de3c..dce25768a 100644 --- a/packages/console/src/components/Status/index.tsx +++ b/packages/console/src/components/Status/index.tsx @@ -4,7 +4,7 @@ import React, { ReactNode } from 'react'; import * as styles from './index.module.scss'; type Props = { - status: 'operational' | 'offline'; + status: 'enabled' | 'disabled'; children: ReactNode; }; diff --git a/packages/console/src/pages/ConnectorDetails/index.tsx b/packages/console/src/pages/ConnectorDetails/index.tsx index 605af09ef..087b3052f 100644 --- a/packages/console/src/pages/ConnectorDetails/index.tsx +++ b/packages/console/src/pages/ConnectorDetails/index.tsx @@ -89,7 +89,7 @@ const ConnectorDetails = () => {
{data.id}
- + {t('connectors.connector_status', { context: data.enabled ? 'enabled' : 'disabled', })} diff --git a/packages/console/src/pages/Connectors/components/ConnectorRow.tsx b/packages/console/src/pages/Connectors/components/ConnectorRow.tsx index d5e10afca..dd23882fb 100644 --- a/packages/console/src/pages/Connectors/components/ConnectorRow.tsx +++ b/packages/console/src/pages/Connectors/components/ConnectorRow.tsx @@ -36,7 +36,7 @@ const ConnectorRow = ({ type, connector }: Props) => { {typeLabel} {type === ConnectorType.Social && ( - + {t( connector?.enabled ? 'connectors.connector_status_enabled' @@ -45,7 +45,7 @@ const ConnectorRow = ({ type, connector }: Props) => { )} {type !== ConnectorType.Social && connector && ( - {t('connectors.connector_status_enabled')} + {t('connectors.connector_status_enabled')} )} {type !== ConnectorType.Social && !connector && (