Files
frontend-app-authoring/src/editors/EditorPage.jsx
Raymond Zhou 80dfc6ba15 feat: www gallery raw selection (#88)
* feat: www gallery raw selection
2022-07-22 10:58:55 -04:00

47 lines
912 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import store from './data/store';
import Editor from './Editor';
export const EditorPage = ({
courseId,
blockType,
blockId,
lmsEndpointUrl,
studioEndpointUrl,
onClose,
}) => (
<Provider store={store}>
<Editor
{...{
onClose,
learningContextId: courseId,
blockType,
blockId,
lmsEndpointUrl,
studioEndpointUrl,
}}
/>
</Provider>
);
EditorPage.defaultProps = {
blockId: null,
courseId: null,
lmsEndpointUrl: null,
onClose: null,
studioEndpointUrl: null,
};
EditorPage.propTypes = {
blockId: PropTypes.string,
blockType: PropTypes.string.isRequired,
courseId: PropTypes.string,
lmsEndpointUrl: PropTypes.string,
onClose: PropTypes.func,
studioEndpointUrl: PropTypes.string,
};
export default EditorPage;