/** * WordPress dependencies */ import { Button, ExternalLink } from '@safe-wordpress/components'; import { useSelect } from '@safe-wordpress/data'; import { useState } from '@safe-wordpress/element'; import { _x } from '@safe-wordpress/i18n'; /** * External dependencies */ import { store as NC_DATA } from '@nelio-content/data'; import { PREMIUM_FEATURES, getSubscribeLabel, getSubscribeLink, } from '@nelio-content/utils'; /** * Internal dependencies */ import './style.scss'; import { LicensePopover } from './license-popover'; import NelioContentLogo from '../../../assets/src/images/full-logo.svg'; export type SubscriptionRequiredPageProps = { readonly page: 'account' | 'content-board'; }; export const SubscriptionRequiredPage = ( { page, }: SubscriptionRequiredPageProps ): JSX.Element => { const { title, subtitle } = TITLES[ page ]; const [ isVisible, setVisible ] = useState( false ); const [ isLocked, lock ] = useState( false ); const today = useSelect( ( select ) => select( NC_DATA ).getToday(), [] ); const subscribeLink = getSubscribeLink( today, 'calendar-sidebar' ); const subscribeLabel = getSubscribeLabel( today ); return (
{ title }
{ subtitle }
{ _x(
'Do you already have a valid subscription?',
'text',
'nelio-content'
) }{ ' ' }
{ _x( 'Nelio Content Premium also gives you:', 'text', 'nelio-content' ) }