Add page for permissions asking
[MAILPOET-1856]
This commit is contained in:
14
assets/js/src/wizard/revenue_tracking_permission.jsx
Normal file
14
assets/js/src/wizard/revenue_tracking_permission.jsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import React from 'react';
|
||||
|
||||
function RevenueTrackingPermission() {
|
||||
return (
|
||||
<div className="mailpoet_welcome_wizard_steps mailpoet_welcome_wizard_centered_column">
|
||||
<div className="mailpoet_welcome_wizard_header">
|
||||
<img src={window.mailpoet_logo_url} width="200" height="87" alt="MailPoet logo"/>
|
||||
</div>
|
||||
<h1>This is the page</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default RevenueTrackingPermission;
|
@@ -3,17 +3,24 @@ import ReactDOM from 'react-dom';
|
||||
import { Route, HashRouter, Redirect } from 'react-router-dom';
|
||||
import WelcomeWizardStepsController from './welcome_wizard_controller.jsx';
|
||||
import WooCommerceImportController from './woocommerce_import_controller.jsx';
|
||||
import RevenueTrackingPermissionController from './revenue_tracking_permission.jsx';
|
||||
|
||||
const container = document.getElementById('mailpoet_wizard_container');
|
||||
|
||||
if (container) {
|
||||
const basePath = window.location.search.includes('woocommerce-list-import') ? '/import' : '/steps/1';
|
||||
let basePath = '/steps/1';
|
||||
if (window.location.search.includes('revenue-tracking-permission')) {
|
||||
basePath = '/revenue-tracking-permission';
|
||||
} else if (window.location.search.includes('woocommerce-list-import')) {
|
||||
basePath = '/import';
|
||||
}
|
||||
ReactDOM.render((
|
||||
<HashRouter>
|
||||
<div>
|
||||
<Route exact path="/" render={() => <Redirect to={basePath} />} />
|
||||
<Route path="/steps/:step" component={WelcomeWizardStepsController} />
|
||||
<Route path="/import" component={WooCommerceImportController} />
|
||||
<Route path="/revenue-tracking-permission" component={RevenueTrackingPermissionController} />
|
||||
</div>
|
||||
</HashRouter>
|
||||
), container);
|
||||
|
Reference in New Issue
Block a user