The DX is not great when you need to do a lot of database resets/command. Should we disable Typescript validation to speed things up? With this and caching database:reset takes 1min instead of 2 on my machine. See also: https://github.com/typeorm/typeorm/issues/4136 And #9291 / #9293 --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
23 lines
688 B
TypeScript
23 lines
688 B
TypeScript
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
|
import { FeatureFlagKey } from '~/generated/graphql';
|
|
|
|
const getFeatureKey = (databaseKey: string): FeatureFlagKey | null => {
|
|
switch (databaseKey) {
|
|
case 'airtable':
|
|
return FeatureFlagKey.IsAirtableIntegrationEnabled;
|
|
case 'postgresql':
|
|
return FeatureFlagKey.IsPostgreSqlIntegrationEnabled;
|
|
case 'stripe':
|
|
return FeatureFlagKey.IsStripeIntegrationEnabled;
|
|
default:
|
|
return null;
|
|
}
|
|
};
|
|
|
|
export const useIsSettingsIntegrationEnabled = (
|
|
databaseKey: string,
|
|
): boolean => {
|
|
const featureKey = getFeatureKey(databaseKey);
|
|
return useIsFeatureEnabled(featureKey);
|
|
};
|