aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/components/container/View.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/components/container/View.js')
-rw-r--r--src/client/react/components/container/View.js21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/client/react/components/container/View.js b/src/client/react/components/container/View.js
index 7ac5d3e..4f16100 100644
--- a/src/client/react/components/container/View.js
+++ b/src/client/react/components/container/View.js
@@ -1,30 +1,13 @@
import React from 'react';
import PropTypes from 'prop-types';
-import createDOMPurify from 'dompurify';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import { fetchSchedule } from '../../actions/view';
import extractSchedule from '../../lib/extractSchedule';
-const Loading = () => <div>Loading...</div>;
-
-const Schedule = ({ htmlStr }) => {
- const DOMPurify = createDOMPurify(window);
-
- const cleanHTML = DOMPurify.sanitize(htmlStr, {
- ADD_ATTR: ['rules'],
- });
-
- return (
- // eslint-disable-next-line react/no-danger
- <div dangerouslySetInnerHTML={{ __html: cleanHTML }} />
- );
-};
-
-Schedule.propTypes = {
- htmlStr: PropTypes.string.isRequired,
-};
+import Schedule from '../presentational/Schedule';
+import Loading from '../presentational/Loading';
const View = ({
schedules,