PagePresentationModal.jsx 789 B

123456789101112131415161718192021222324252627282930
  1. import React from 'react';
  2. import {
  3. Modal, ModalBody,
  4. } from 'reactstrap';
  5. import { usePagePresentationModal } from '~/stores/modal';
  6. import styles from './PagePresentationModal.module.scss';
  7. const PagePresentationModal = () => {
  8. const { data: presentationData, close: closePresentationModal } = usePagePresentationModal();
  9. return (
  10. <Modal
  11. isOpen={presentationData.isOpened}
  12. toggle={closePresentationModal}
  13. data-testid="page-presentation-modal"
  14. className={`grw-presentation-modal ${styles['grw-presentation-modal']} grw-body-only-modal-expanded`}
  15. unmountOnClose={false}
  16. >
  17. <ModalBody className="modal-body">
  18. <iframe src={presentationData.href} />
  19. </ModalBody>
  20. </Modal>
  21. );
  22. };
  23. export default PagePresentationModal;