Adding hard-coded application header.

This commit is contained in:
David Joy
2020-01-15 15:51:18 -05:00
parent ed2a14de95
commit 501500f116
28 changed files with 145 additions and 60 deletions

View File

@@ -0,0 +1,22 @@
import React, { useRef } from 'react';
import PropTypes from 'prop-types';
import { getConfig } from '@edx/frontend-platform';
export default function Unit({ id, pageTitle }) {
const iframeRef = useRef(null);
const iframeUrl = `${getConfig().LMS_BASE_URL}/xblock/${id}`;
return (
<iframe
className="flex-grow-1"
title={pageTitle}
ref={iframeRef}
src={iframeUrl}
/>
);
}
Unit.propTypes = {
id: PropTypes.string.isRequired,
pageTitle: PropTypes.string.isRequired,
};