All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.js.components.SegmentsExperimentsDetails.es.js Maven / Gradle / Ivy

There is a newer version: 3.0.99
Show newest version
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */

import React from 'react';

import {SegmentsExperimentType} from '../types.es';
import {indexToPercentageString} from '../util/percentages.es';
import {STATUS_DRAFT} from '../util/statuses.es';

function SegmentsExperimentsDetails({segmentsExperiment}) {
	const {
		confidenceLevel,
		description,
		goal,
		segmentsEntryName,
		status,
		type,
	} = segmentsExperiment;

	return (
		<>
			
{Liferay.Language.get('details')}
{description && (
{`${Liferay.Language.get('description')}:`}
{description}
)}
{`${Liferay.Language.get('segment')}:`}
{segmentsEntryName}
{`${Liferay.Language.get('goal')}:`}
{goal.label}
{status.value !== STATUS_DRAFT && type.value === 'AB' && (
{`${Liferay.Language.get('confidence-level')}:`}
{indexToPercentageString(confidenceLevel)}
{Liferay.FeatureFlags['LRAC-15017'] && (
{`${Liferay.Language.get('test-type')}:`}
{Liferay.Language.get('standard')}
)}
)} {Liferay.FeatureFlags['LRAC-15017'] && status.value !== STATUS_DRAFT && type.value === 'MAB' && (
{`${Liferay.Language.get('test-type')}:`}
{Liferay.Language.get('dynamic')}
)}
); } SegmentsExperimentsDetails.propTypes = { segmentsExperiment: SegmentsExperimentType, }; export default SegmentsExperimentsDetails;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy