/* global gettext */ /* eslint react/no-array-index-key: 0 */ import PropTypes from 'prop-types'; import React from 'react'; import ReactDOM from 'react-dom'; function CourseOrLibraryListing(props) { const allowReruns = props.allowReruns; const linkClass = props.linkClass; const idBase = props.idBase; return ( ); } CourseOrLibraryListing.propTypes = { allowReruns: PropTypes.bool.isRequired, idBase: PropTypes.string.isRequired, items: PropTypes.arrayOf(PropTypes.object).isRequired, linkClass: PropTypes.string.isRequired, }; export class StudioCourseIndex { constructor(selector, context, allowReruns) { // The HTML element is only conditionally shown, based on number of courses. const element = document.querySelector(selector); if (element) { ReactDOM.render( , element, ); } } } export class StudioArchivedIndex { constructor(selector, context, allowReruns) { // The HTML element is only conditionally shown, based on number of archived courses. const element = document.querySelector(selector); if (element) { ReactDOM.render( , element, ); } } } export class StudioLibraryIndex { constructor(selector, context) { // The HTML element is only conditionally shown, based on number of libraries. const element = document.querySelector(selector); if (element) { ReactDOM.render( , document.querySelector(selector), ); } } }