chuckya/app/javascript/flavours/glitch/containers/media_gallery_container.js

35 lines
864 B
JavaScript
Raw Normal View History

import React from 'react';
import PropTypes from 'prop-types';
import { IntlProvider, addLocaleData } from 'react-intl';
2017-11-18 12:11:18 +09:00
import { getLocale } from 'mastodon/locales';
2017-12-04 16:26:40 +09:00
import MediaGallery from 'flavours/glitch/components/media_gallery';
import { fromJS } from 'immutable';
const { localeData, messages } = getLocale();
addLocaleData(localeData);
export default class MediaGalleryContainer extends React.PureComponent {
static propTypes = {
locale: PropTypes.string.isRequired,
media: PropTypes.array.isRequired,
};
handleOpenMedia = () => {}
render () {
const { locale, media, ...props } = this.props;
return (
<IntlProvider locale={locale} messages={messages}>
<MediaGallery
{...props}
media={fromJS(media)}
onOpenMedia={this.handleOpenMedia}
/>
</IntlProvider>
);
}
}