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

META-INF.resources.js.components.ConnectToAC.tsx Maven / Gradle / Ivy

There is a newer version: 2.0.101
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 ClayIcon from '@clayui/icon';
import ClayLink from '@clayui/link';
import React, {MouseEventHandler} from 'react';

interface Props {
	analyticsURL: string;
	hideAnalyticsReportsPanelURL: string;
	isAnalyticsConnected: boolean;
	onHideAnalyticsReportsPanelClick: MouseEventHandler;
	pathToAssets: string;
}

export default function ConnectToAC({
	analyticsURL,
	isAnalyticsConnected,
	hideAnalyticsReportsPanelURL,
	pathToAssets,

	onHideAnalyticsReportsPanelClick = (event) => {
		event.preventDefault();

		// @ts-ignore

		if (document.hrefFm && typeof submitForm !== 'undefined') {

			// @ts-ignore

			submitForm(document.hrefFm, hideAnalyticsReportsPanelURL);
		}
	},
}: Props) {
	return (
		
{Liferay.Language.get('connect-to-liferay-analytics-cloud')} {isAnalyticsConnected ? ( <>
{Liferay.Language.get('sync-to-analytics-cloud')}

{Liferay.Language.get( 'sync-your-liferay-dxp-instance-with-analytics-cloud-to-view-content-performance-metrics-and-build-a-successful-content-strategy' )}

{Liferay.Language.get('open-analytics-cloud')} ) : ( <>
{Liferay.Language.get( 'connect-to-liferay-analytics-cloud' )}

{Liferay.Language.get( 'liferay-dxp-instance-has-to-be-connected-with-analytics-cloud-to-view-content-performance-metrics-and-build-a-successful-content-strategy' )}

{Liferay.Language.get('do-not-show-me-this-again')}

{Liferay.Language.get('do-not-show-me-this-again-help')}

)}
); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy