There seems to be an issue with useSetting. Simply having `useSetting('welcome_wizard_current_step')` in App causes re-renders on any state change. The effect was that you could only type one letter in the input fields before the app would re-render and the field would lose focus. I tried and failed to figure out what was causing all the re-renders, so for now I've settled on this workaround, since we only care about the initial state of the setting anyway. That being said, this seems like something we should investigate as it could be affecting other components and causing lots of unnecessary re-renders. MAILPOET-5216
36 lines
1.6 KiB
HTML
36 lines
1.6 KiB
HTML
<% extends 'layout.html' %> <% block content %>
|
|
<script>
|
|
var mailpoet_logo_url = '<%= cdn_url('welcome-wizard/mailpoet-logo.20200623.png') %>';
|
|
var wizard_sender_illustration_url = '<%= cdn_url('welcome-wizard/sender.20200623.png') %>';
|
|
var wizard_tracking_illustration_url = '<%= cdn_url('welcome-wizard/tracking.20200623.png') %>';
|
|
var wizard_woocommerce_illustration_url = '<%= cdn_url('welcome-wizard/woocommerce.20200623.png') %>';
|
|
var wizard_MSS_pitch_illustration_url = '<%= cdn_url('welcome-wizard/illu-pitch-mss.20190912.png') %>';
|
|
var finish_wizard_url = '<%= finish_wizard_url %>';
|
|
var admin_email = <%= json_encode(admin_email) %>;
|
|
var hide_mailpoet_beacon = true;
|
|
var mailpoet_show_customers_import = <%= json_encode(show_customers_import) %>;
|
|
var mailpoet_account_url = '<%= add_referral_id("https://account.mailpoet.com/?s=" ~ subscriber_count ~ "&email=" ~ current_wp_user.user_email|escape('js')) %>';
|
|
var mailpoet_settings = <%= json_encode(settings) %>;
|
|
var mailpoet_premium_key_valid = <%= json_encode(premium_key_valid) %>;
|
|
var mailpoet_mss_key_valid = <%= json_encode(mss_key_valid) %>;
|
|
var wizard_has_tracking_settings = <%= json_encode(has_tracking_settings) %>;
|
|
var mailpoet_welcome_wizard_current_step = <%= json_encode(welcome_wizard_current_step) %>;
|
|
</script>
|
|
|
|
<div id="mailpoet-wizard-container"></div>
|
|
|
|
<div class="mailpoet-wizard-video">
|
|
<iframe
|
|
width="1"
|
|
height="1"
|
|
src="https://player.vimeo.com/video/279123953"
|
|
frameborder="0"
|
|
></iframe>
|
|
</div>
|
|
|
|
<% include 'mss_pitch_translations.html' %>
|
|
<% include 'premium_key_validation_strings.html' %>
|
|
<% include 'settings_translations.html' %>
|
|
|
|
<% endblock %>
|