diff --git a/packages/console/src/pages/ConnectorDetails/components/ConnectorContent.tsx b/packages/console/src/pages/ConnectorDetails/components/ConnectorContent.tsx index baeb87e10..ff6ed294c 100644 --- a/packages/console/src/pages/ConnectorDetails/components/ConnectorContent.tsx +++ b/packages/console/src/pages/ConnectorDetails/components/ConnectorContent.tsx @@ -103,7 +103,11 @@ const ConnectorContent = ({ isDeleted, connectorData, onConnectorUpdated }: Prop description="connector_details.settings_description" learnMoreLink="https://docs.logto.io/docs/references/connectors" > - + {connectorData.type !== ConnectorType.Social && ( { +const ConnectorForm = ({ + configTemplate, + isStandard, + isAllowEditTarget, + isDarkDefaultVisible, + connectorType, +}: Props) => { const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' }); - const { configTemplate, isStandard, logoDark } = connector; const { control, register, formState: { errors }, } = useFormContext(); - const [darkVisible, setDarkVisible] = useState(Boolean(logoDark)); + const [darkVisible, setDarkVisible] = useState(Boolean(isDarkDefaultVisible)); const toggleDarkVisible = () => { setDarkVisible((previous) => !previous); @@ -141,7 +149,7 @@ const ConnectorForm = ({ connector, isAllowEditTarget }: Props) => { )} /> - {connector.type === ConnectorType.Social && ( + {connectorType === ConnectorType.Social && ( { {t('connectors.guide.connector_setting')} - + {!isSocialConnector && (