0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00

fix(console): change status component type (#398)

This commit is contained in:
Wang Sijie 2022-03-16 16:20:24 +08:00 committed by GitHub
parent 31a171f202
commit 305b6aefb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -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;
};

View file

@ -89,7 +89,7 @@ const ConnectorDetails = () => {
<div className={styles.id}>{data.id}</div>
</div>
<div>
<Status status={data.enabled ? 'operational' : 'offline'}>
<Status status={data.enabled ? 'enabled' : 'disabled'}>
{t('connectors.connector_status', {
context: data.enabled ? 'enabled' : 'disabled',
})}

View file

@ -36,7 +36,7 @@ const ConnectorRow = ({ type, connector }: Props) => {
<td>{typeLabel}</td>
<td>
{type === ConnectorType.Social && (
<Status status={connector?.enabled ? 'operational' : 'offline'}>
<Status status={connector?.enabled ? 'enabled' : 'disabled'}>
{t(
connector?.enabled
? 'connectors.connector_status_enabled'
@ -45,7 +45,7 @@ const ConnectorRow = ({ type, connector }: Props) => {
</Status>
)}
{type !== ConnectorType.Social && connector && (
<Status status="operational">{t('connectors.connector_status_enabled')}</Status>
<Status status="enabled">{t('connectors.connector_status_enabled')}</Status>
)}
{type !== ConnectorType.Social && !connector && (
<Button title="admin_console.connectors.set_up" type="primary" />