You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
864 B
35 lines
864 B
7 years ago
|
import React from 'react';
|
||
|
import PropTypes from 'prop-types';
|
||
|
import { IntlProvider, addLocaleData } from 'react-intl';
|
||
7 years ago
|
import { getLocale } from 'mastodon/locales';
|
||
7 years ago
|
import MediaGallery from 'flavours/glitch/components/media_gallery';
|
||
7 years ago
|
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>
|
||
|
);
|
||
|
}
|
||
|
|
||
|
}
|