mirror of
https://github.com/logto-io/logto.git
synced 2025-03-10 22:22:45 -05:00
fix(console): show platform icons for non-universal (#3243)
This commit is contained in:
parent
85c60bf8f5
commit
89ba9bdc70
1 changed files with 5 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
import { ConnectorType } from '@logto/schemas';
|
||||
import { ConnectorPlatform, ConnectorType } from '@logto/schemas';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
|
@ -26,6 +26,9 @@ const ConnectorName = ({ connectorGroup }: Props) => {
|
|||
const { type, connectors } = connectorGroup;
|
||||
const connector = connectors[0];
|
||||
const navigate = useNavigate();
|
||||
const hasNonUniversalConnector = connectors.some(
|
||||
({ platform }) => platform !== ConnectorPlatform.Universal
|
||||
);
|
||||
|
||||
if (!connector) {
|
||||
const PlaceholderIcon = connectorPlaceholderIcon[type];
|
||||
|
@ -60,7 +63,7 @@ const ConnectorName = ({ connectorGroup }: Props) => {
|
|||
subtitle={
|
||||
<>
|
||||
{type !== ConnectorType.Social && connector.id}
|
||||
{type === ConnectorType.Social && connectors.length > 1 && (
|
||||
{type === ConnectorType.Social && hasNonUniversalConnector && (
|
||||
<div className={styles.platforms}>
|
||||
{connectors.map(
|
||||
({ id, platform }) =>
|
||||
|
|
Loading…
Add table
Reference in a new issue