Add context to newsletters entrypoint
[MAILPOET-2389]
This commit is contained in:
committed by
Jack Kitterhing
parent
41697e1580
commit
89d0362f13
@ -20,6 +20,7 @@ import NewsletterListNotification from 'newsletters/listings/notification.jsx';
|
||||
import NewsletterListNotificationHistory from 'newsletters/listings/notification_history.jsx';
|
||||
import NewsletterSendingStatus from 'newsletters/sending_status.jsx';
|
||||
import CampaignStatsPage from 'newsletters/campaign_stats/page.jsx';
|
||||
import { GlobalContext, useGlobalContextValue } from 'context/index.jsx';
|
||||
|
||||
const getAutomaticEmailsRoutes = () => {
|
||||
if (!window.mailpoet_automatic_emails) return null;
|
||||
@ -98,6 +99,7 @@ const routes = Hooks.applyFilters('mailpoet_newsletters_before_router', [
|
||||
]);
|
||||
|
||||
const App = () => (
|
||||
<GlobalContext.Provider value={useGlobalContextValue(window)}>
|
||||
<HashRouter>
|
||||
<Switch>
|
||||
<Route exact path="/" render={() => <Redirect to="/standard" />} />
|
||||
@ -113,6 +115,7 @@ const App = () => (
|
||||
))}
|
||||
</Switch>
|
||||
</HashRouter>
|
||||
</GlobalContext.Provider>
|
||||
);
|
||||
|
||||
const container = document.getElementById('newsletters_container');
|
||||
|
Reference in New Issue
Block a user