diff --git a/src/index.jsx b/src/index.jsx index 9dc01be5..e8aa6938 100755 --- a/src/index.jsx +++ b/src/index.jsx @@ -27,6 +27,7 @@ import { TabContainer } from './tab-page'; import { fetchDatesTab, fetchOutlineTab, fetchProgressTab } from './course-home/data'; import { fetchCourse } from './courseware/data'; import initializeStore from './store'; +import NexBlockPage from './plugin-test/NexBlockPage'; import PluginTestPage from './plugin-test/PluginTestPage'; subscribe(APP_READY, () => { @@ -34,7 +35,8 @@ subscribe(APP_READY, () => { - + + diff --git a/src/plugin-test/NexBlockPage.jsx b/src/plugin-test/NexBlockPage.jsx new file mode 100644 index 00000000..2f1c0217 --- /dev/null +++ b/src/plugin-test/NexBlockPage.jsx @@ -0,0 +1,26 @@ +import React, { Component } from 'react'; + +import Plugin, { COMPONENT } from './Plugin'; + +const FALLBACK_URL = 'http://localhost:7331/remoteEntry.js'; +const FALLBACK_VIEW = 'PluginOne'; + +// eslint-disable-next-line react/prefer-stateless-function +export default class NexBlockPage extends Component { + render() { + // eslint-disable-next-line react/prop-types + const query = new URLSearchParams(this.props.location.search); + + const plugin = { + url: query.get('url') ?? FALLBACK_URL, + scope: 'plugin', + module: `./${query.get('view') ?? FALLBACK_VIEW}`, + type: COMPONENT, + }; + return ( +
+ +
+ ); + } +}