feat: add Active and Add integration card displays (#4591)
* feat: add Active and Add integration card displays Closes #4541 * docs: add PaymentSuccess page stories * refactor: move page components
This commit is contained in:
@ -0,0 +1,35 @@
|
||||
import { MOCK_REMOTE_DATABASES } from '@/settings/integrations/constants/MockRemoteDatabases';
|
||||
import { SETTINGS_INTEGRATION_REQUEST_CATEGORY } from '@/settings/integrations/constants/SettingsIntegrationRequest';
|
||||
import { SETTINGS_INTEGRATION_WINDMILL_CATEGORY } from '@/settings/integrations/constants/SettingsIntegrationWindmill';
|
||||
import { SETTINGS_INTEGRATION_ZAPIER_CATEGORY } from '@/settings/integrations/constants/SettingsIntegrationZapier';
|
||||
import { SettingsIntegrationCategory } from '@/settings/integrations/types/SettingsIntegrationCategory';
|
||||
import { getSettingsIntegrationAll } from '@/settings/integrations/utils/getSettingsIntegrationAll';
|
||||
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
||||
|
||||
export const useSettingsIntegrationCategories =
|
||||
(): SettingsIntegrationCategory[] => {
|
||||
const isAirtableIntegrationEnabled = useIsFeatureEnabled(
|
||||
'IS_AIRTABLE_INTEGRATION_ENABLED',
|
||||
);
|
||||
const isAirtableIntegrationActive = !!MOCK_REMOTE_DATABASES.find(
|
||||
({ name }) => name === 'airtable',
|
||||
)?.isActive;
|
||||
const isPostgresqlIntegrationEnabled = useIsFeatureEnabled(
|
||||
'IS_POSTGRESQL_INTEGRATION_ENABLED',
|
||||
);
|
||||
const isPostgresqlIntegrationActive = !!MOCK_REMOTE_DATABASES.find(
|
||||
({ name }) => name === 'postgresql',
|
||||
)?.isActive;
|
||||
|
||||
return [
|
||||
getSettingsIntegrationAll({
|
||||
isAirtableIntegrationEnabled,
|
||||
isAirtableIntegrationActive,
|
||||
isPostgresqlIntegrationEnabled,
|
||||
isPostgresqlIntegrationActive,
|
||||
}),
|
||||
SETTINGS_INTEGRATION_ZAPIER_CATEGORY,
|
||||
SETTINGS_INTEGRATION_WINDMILL_CATEGORY,
|
||||
SETTINGS_INTEGRATION_REQUEST_CATEGORY,
|
||||
];
|
||||
};
|
||||
Reference in New Issue
Block a user