mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
26 lines
524 B
TypeScript
26 lines
524 B
TypeScript
import type { Feature } from './types';
|
|
|
|
import app from '../app';
|
|
import { getEnvValue } from '../utils';
|
|
|
|
const clientKey = getEnvValue('NEXT_PUBLIC_GROWTH_BOOK_CLIENT_KEY');
|
|
|
|
const title = 'GrowthBook feature flagging and A/B testing';
|
|
|
|
const config: Feature<{ clientKey: string }> = (() => {
|
|
if (!app.isPrivateMode && clientKey) {
|
|
return Object.freeze({
|
|
title,
|
|
isEnabled: true,
|
|
clientKey,
|
|
});
|
|
}
|
|
|
|
return Object.freeze({
|
|
title,
|
|
isEnabled: false,
|
|
});
|
|
})();
|
|
|
|
export default config;
|