This commit is contained in:
proelements
2025-11-13 15:18:34 +02:00
commit 9ac2bf2aa0
1178 changed files with 296944 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import ConnectButtonUI from '../ui/connect-button';
import { htmlDecodeTextContent, replaceUtmPlaceholders } from '../utils';
export default function useFeatureLock( featureName ) {
const appConfig = elementorAppProConfig[ featureName ] ?? {},
isLocked = appConfig.lock?.is_locked ?? false;
const buttonText = htmlDecodeTextContent( appConfig.lock?.button.text );
const buttonLink = replaceUtmPlaceholders(
appConfig.lock?.button.url ?? '',
appConfig.utms ?? {},
);
const ConnectButton = () => (
<ConnectButtonUI text={ buttonText } url={ buttonLink } />
);
return {
isLocked,
ConnectButton,
};
}