mirror of
https://github.com/hanzonet/explore.git
synced 2026-10-30 18:16:57 +00:00
* base implementation of client script with envs values * better ENVs setup for pw tests * fix tests
25 lines
459 B
TypeScript
25 lines
459 B
TypeScript
import type { Feature } from './types';
|
|
|
|
import { getEnvValue } from '../utils';
|
|
|
|
const propertyId = getEnvValue('NEXT_PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID');
|
|
|
|
const title = 'Google analytics';
|
|
|
|
const config: Feature<{ propertyId: string }> = (() => {
|
|
if (propertyId) {
|
|
return Object.freeze({
|
|
title,
|
|
isEnabled: true,
|
|
propertyId,
|
|
});
|
|
}
|
|
|
|
return Object.freeze({
|
|
title,
|
|
isEnabled: false,
|
|
});
|
|
})();
|
|
|
|
export default config;
|