refactor(app-config): remove canCustomConnect virtual attribute

This commit is contained in:
Ali BARIN
2024-10-09 09:35:36 +00:00
committed by Faruk AYDIN
parent 6e42b52414
commit a76bee51fc
9 changed files with 12 additions and 25 deletions

View File

@@ -77,7 +77,8 @@ export default function Application() {
const connectionOptions = React.useMemo(() => {
const shouldHaveCustomConnection =
appConfig?.data?.connectionAllowed && appConfig?.data?.canCustomConnect;
appConfig?.data?.connectionAllowed &&
appConfig?.data?.allowCustomConnection;
const options = [
{
@@ -155,8 +156,9 @@ export default function Application() {
disabled={
!allowed ||
(appConfig?.data &&
!appConfig?.data?.disabled &&
!appConfig?.data?.connectionAllowed &&
!appConfig?.data?.canCustomConnect) ||
!appConfig?.data?.allowCustomConnection) ||
connectionOptions.every(({ disabled }) => disabled)
}
options={connectionOptions}