This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2017-09-13 18:39:10 -07:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { IntlProvider, addLocaleData } from 'react-intl';
|
2017-11-17 19:11:18 -08:00
|
|
|
import { getLocale } from 'mastodon/locales';
|
|
|
|
import MediaGallery from 'themes/glitch/components/media_gallery';
|
2017-09-13 18:39:10 -07:00
|
|
|
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>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|