diff --git a/app/javascript/gabsocial/containers/media_container.js b/app/javascript/gabsocial/containers/media_container.js index dc26b40a..b622f9b7 100644 --- a/app/javascript/gabsocial/containers/media_container.js +++ b/app/javascript/gabsocial/containers/media_container.js @@ -1,19 +1,18 @@ -import { Fragment } from 'react' -import ReactDOM from 'react-dom' -import { List as ImmutableList, fromJS } from 'immutable' -import { IntlProvider, addLocaleData } from 'react-intl' -import { getLocale } from '../locales' -import Video from '../components/video' -import StatusCard from '../components/status_card' -import Poll from 'gabsocial/components/poll' -import MediaGallery from '../components/media_gallery' -import ModalRoot from '../components/modal/modal_root' -import MediaModal from '../components/modal/media_modal' +import React, { PureComponent, Fragment } from 'react'; +import ReactDOM from 'react-dom'; +import PropTypes from 'prop-types'; +import { IntlProvider, addLocaleData } from 'react-intl'; +import { getLocale } from '../locales'; +import MediaGallery from 'gabsocial/components/media_gallery'; +import Video from 'gabsocial/components/video'; +import Card from 'gabsocial/components/status_card'; +import Poll from 'gabsocial/components/poll'; +import { List as ImmutableList, fromJS } from 'immutable'; const { localeData, messages } = getLocale(); addLocaleData(localeData); -const MEDIA_COMPONENTS = { MediaGallery, Video, StatusCard, Poll }; +const MEDIA_COMPONENTS = { MediaGallery, Video, Card, Poll }; export default class MediaContainer extends PureComponent { @@ -29,19 +28,19 @@ export default class MediaContainer extends PureComponent { }; handleOpenMedia = (media, index) => { - document.body.classList.add(_s.overflowYHidden); + document.body.classList.add('with-modals--active'); this.setState({ media, index }); } handleOpenVideo = (video, time) => { const media = ImmutableList([video]); - document.body.classList.add(_s.overflowYHidden); + document.body.classList.add('with-modals--active'); this.setState({ media, time }); } handleCloseMedia = () => { - document.body.classList.remove(_s.overflowYHidden); + document.body.classList.remove('with-modals--active'); this.setState({ media: null, index: null, time: null }); } @@ -73,19 +72,9 @@ export default class MediaContainer extends PureComponent { component, ); })} - - {this.state.media && ( - - )} - ); } -} +} \ No newline at end of file diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js index 16d997ba..fe090166 100644 --- a/app/javascript/packs/public.js +++ b/app/javascript/packs/public.js @@ -90,7 +90,6 @@ function main ( ) { component.removeChild(child); }); }); - const content = document.createElement('div'); ReactDOM.render(, content); @@ -98,7 +97,7 @@ function main ( ) { scrollToDetailedStatus(); }) .catch(error => { - console.error(error); + console.error("hello larry-1", error); scrollToDetailedStatus(); }); } else { @@ -228,7 +227,7 @@ function main ( ) { }, 700); } } catch (err) { - console.error(err); + console.error("hello larry-2", err); } input.readonly = oldReadOnly; @@ -236,5 +235,5 @@ function main ( ) { } loadPolyfills().then(main).catch(error => { - console.error(error); + console.error("hello larry-3", error); });