bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/presentation-pod/container.jsx

33 lines
1.2 KiB
React
Raw Normal View History

import React from 'react';
import PropTypes from 'prop-types';
import { withTracker } from 'meteor/react-meteor-data';
import ErrorBoundary from '/imports/ui/components/common/error-boundary/component';
import FallbackView from '/imports/ui/components/common/fallback-errors/fallback-view/component';
import PresentationPodService from './service';
import PresentationPods from './component';
// PresentationPods component will be the place to go once we have the presentation pods designs
2021-06-09 21:49:59 +08:00
// it should give each PresentationContainer some space
// which it will fill with the uploaded presentation
const PresentationPodsContainer = ({ presentationPodIds, ...props }) => {
if (presentationPodIds && presentationPodIds.length > 0) {
return (
<ErrorBoundary Fallback={FallbackView}>
2019-03-27 01:36:26 +08:00
<PresentationPods presentationPodIds={presentationPodIds} {...props} />
</ErrorBoundary>
);
}
return null;
};
export default withTracker(() => ({
presentationPodIds: PresentationPodService.getPresentationPodIds(),
}))(PresentationPodsContainer);
PresentationPodsContainer.propTypes = {
presentationPodIds: PropTypes.arrayOf(PropTypes.shape({
podId: PropTypes.string.isRequired,
})).isRequired,
};