mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -05:00
fix(console): fix enterprise SSO creation model button status
This commit is contained in:
parent
c0ca5b427c
commit
32a2d90cee
1 changed files with 7 additions and 7 deletions
|
@ -131,13 +131,12 @@ function SsoCreationModal({ isOpen, onClose: rawOnClose }: Props) {
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
const isCreateButtonDisabled = useMemo(() => {
|
// The button is available only when:
|
||||||
// The button is available only when:
|
// 1. `connectorName` field is not empty.
|
||||||
// 1. `connectorName` field is not empty.
|
// 2. At least one connector is selected.
|
||||||
// 2. At least one connector is selected.
|
// 3. Error is resolved. Since `connectorName` is the only field of this form, it means `connectorName` field error is resolved.
|
||||||
// 3. Error is resolved. Since `connectorName` is the only field of this form, it means `connectorName` field error is resolved.
|
const isCreateButtonDisabled =
|
||||||
return !(watch('connectorName') && isAnyConnectorSelected) || Boolean(errors.connectorName);
|
!(watch('connectorName') && isAnyConnectorSelected) || Boolean(errors.connectorName);
|
||||||
}, [errors.connectorName, isAnyConnectorSelected, watch]);
|
|
||||||
|
|
||||||
if (!isOpen) {
|
if (!isOpen) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -158,6 +157,7 @@ function SsoCreationModal({ isOpen, onClose: rawOnClose }: Props) {
|
||||||
paywall={conditional(
|
paywall={conditional(
|
||||||
isDevFeaturesEnabled && planId === ReservedPlanId.Pro && ReservedPlanId.Pro
|
isDevFeaturesEnabled && planId === ReservedPlanId.Pro && ReservedPlanId.Pro
|
||||||
)}
|
)}
|
||||||
|
hasAddOnTag={isDevFeaturesEnabled}
|
||||||
footer={
|
footer={
|
||||||
conditional(
|
conditional(
|
||||||
isDevFeaturesEnabled &&
|
isDevFeaturesEnabled &&
|
||||||
|
|
Loading…
Reference in a new issue