| 1 |
import { Icon } from '@wordpress/components' |
| 2 |
import { Button } from '@wordpress/components' |
| 3 |
import { useRef } from '@wordpress/element' |
| 4 |
import { __ } from '@wordpress/i18n' |
| 5 |
import { General } from '@library/api/General' |
| 6 |
import { useGlobalStore } from '@library/state/GlobalState' |
| 7 |
import { useUserStore } from '@library/state/User' |
| 8 |
import { |
| 9 |
growthArrow, |
| 10 |
patterns, |
| 11 |
layouts, |
| 12 |
support, |
| 13 |
star, |
| 14 |
brandLogo, |
| 15 |
diamond, |
| 16 |
} from '../icons' |
| 17 |
import { SplitModal } from './SplitModal' |
| 18 |
import { SettingsModal } from './settings/SettingsModal' |
| 19 |
|
| 20 |
export const NoImportModal = () => { |
| 21 |
const pushModal = useGlobalStore((state) => state.pushModal) |
| 22 |
const initialFocus = useRef(null) |
| 23 |
return ( |
| 24 |
<SplitModal |
| 25 |
isOpen={true} |
| 26 |
ref={initialFocus} |
| 27 |
leftContainerBgColor="bg-white"> |
| 28 |
<div> |
| 29 |
<div className="mb-5 flex items-center space-x-2 text-extendify-black"> |
| 30 |
{brandLogo} |
| 31 |
</div> |
| 32 |
|
| 33 |
<h3 className="mt-0 text-xl"> |
| 34 |
{__("You're out of imports", 'extendify')} |
| 35 |
</h3> |
| 36 |
<p className="text-sm text-black"> |
| 37 |
{__( |
| 38 |
'Sign up today and get unlimited access to our entire collection of patterns and page layouts.', |
| 39 |
'extendify', |
| 40 |
)} |
| 41 |
</p> |
| 42 |
<div> |
| 43 |
<a |
| 44 |
target="_blank" |
| 45 |
ref={initialFocus} |
| 46 |
className="button-extendify-main button-focus mt-2 inline-flex justify-center px-4 py-3" |
| 47 |
style={{ minWidth: '225px' }} |
| 48 |
href={`https://extendify.com/pricing/?utm_source=${ |
| 49 |
window.extendifyData.sdk_partner |
| 50 |
}&utm_medium=library&utm_campaign=no-imports-modal&utm_content=get-unlimited-imports&utm_group=${useUserStore |
| 51 |
.getState() |
| 52 |
.activeTestGroupsUtmValue()}`} |
| 53 |
onClick={async () => |
| 54 |
await General.ping('no-imports-modal-click') |
| 55 |
} |
| 56 |
rel="noreferrer"> |
| 57 |
{__('Get Unlimited Imports', 'extendify')} |
| 58 |
<Icon icon={growthArrow} size={24} className="-mr-1" /> |
| 59 |
</a> |
| 60 |
<p className="mb-0 text-left text-sm text-extendify-gray"> |
| 61 |
{__('Have an account?', 'extendify')} |
| 62 |
<Button |
| 63 |
onClick={() => pushModal(<SettingsModal />)} |
| 64 |
className="pl-2 text-sm text-extendify-gray underline hover:no-underline"> |
| 65 |
{__('Sign in', 'extendify')} |
| 66 |
</Button> |
| 67 |
</p> |
| 68 |
</div> |
| 69 |
</div> |
| 70 |
<div className="flex h-full flex-col justify-center space-y-2 p-10 text-black"> |
| 71 |
<div className="flex items-center space-x-3"> |
| 72 |
<Icon icon={patterns} size={24} /> |
| 73 |
<span className="text-sm leading-none"> |
| 74 |
{__("Access to 100's of Patterns", 'extendify')} |
| 75 |
</span> |
| 76 |
</div> |
| 77 |
<div className="flex items-center space-x-3"> |
| 78 |
<Icon icon={diamond} size={24} /> |
| 79 |
<span className="text-sm leading-none"> |
| 80 |
{__('Access to "Pro" catalog', 'extendify')} |
| 81 |
</span> |
| 82 |
</div> |
| 83 |
<div className="flex items-center space-x-3"> |
| 84 |
<Icon icon={layouts} size={24} /> |
| 85 |
<span className="text-sm leading-none"> |
| 86 |
{__('Beautiful full page layouts', 'extendify')} |
| 87 |
</span> |
| 88 |
</div> |
| 89 |
<div className="flex items-center space-x-3"> |
| 90 |
<Icon icon={support} size={24} /> |
| 91 |
<span className="text-sm leading-none"> |
| 92 |
{__('Fast and friendly support', 'extendify')} |
| 93 |
</span> |
| 94 |
</div> |
| 95 |
<div className="flex items-center space-x-3"> |
| 96 |
<Icon icon={star} size={24} /> |
| 97 |
<span className="text-sm leading-none"> |
| 98 |
{__('14-Day guarantee', 'extendify')} |
| 99 |
</span> |
| 100 |
</div> |
| 101 |
</div> |
| 102 |
</SplitModal> |
| 103 |
) |
| 104 |
} |
| 105 |
|