mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -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:
|
||||
// 1. `connectorName` field is not empty.
|
||||
// 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.
|
||||
return !(watch('connectorName') && isAnyConnectorSelected) || Boolean(errors.connectorName);
|
||||
}, [errors.connectorName, isAnyConnectorSelected, watch]);
|
||||
// The button is available only when:
|
||||
// 1. `connectorName` field is not empty.
|
||||
// 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.
|
||||
const isCreateButtonDisabled =
|
||||
!(watch('connectorName') && isAnyConnectorSelected) || Boolean(errors.connectorName);
|
||||
|
||||
if (!isOpen) {
|
||||
return null;
|
||||
|
@ -158,6 +157,7 @@ function SsoCreationModal({ isOpen, onClose: rawOnClose }: Props) {
|
|||
paywall={conditional(
|
||||
isDevFeaturesEnabled && planId === ReservedPlanId.Pro && ReservedPlanId.Pro
|
||||
)}
|
||||
hasAddOnTag={isDevFeaturesEnabled}
|
||||
footer={
|
||||
conditional(
|
||||
isDevFeaturesEnabled &&
|
||||
|
|
Loading…
Reference in a new issue