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

fix(console): auto expand dark logo field (#2782)

This commit is contained in:
wangsijie 2022-12-30 15:25:30 +08:00 committed by GitHub
parent 28f8e8a9a8
commit 2b2c5ecb7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,13 +25,13 @@ type Props = {
const ConnectorForm = ({ connector, isAllowEditTarget }: Props) => {
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' });
const { configTemplate, isStandard } = connector;
const { configTemplate, isStandard, logoDark } = connector;
const {
control,
register,
formState: { errors },
} = useFormContext<ConnectorFormType>();
const [darkVisible, setDarkVisible] = useState(false);
const [darkVisible, setDarkVisible] = useState(Boolean(logoDark));
const toggleDarkVisible = () => {
setDarkVisible((previous) => !previous);