0
0
Fork 0

Add attachment list fallback to public pages (#9780)

* Add attachment list fallback to public pages

Fixes #6714

* Refactor attachments lists
This commit is contained in:
ThibG 2019-01-13 10:23:54 +01:00 committed by Eugen Rochko
parent 9ee9cb549b
commit 4fb94c758e
5 changed files with 28 additions and 6 deletions

View file

@ -83,6 +83,12 @@ function main() {
if (reactComponents.length > 0) {
import(/* webpackChunkName: "containers/media_container" */ '../mastodon/containers/media_container')
.then(({ default: MediaContainer }) => {
[].forEach.call(reactComponents, (component) => {
[].forEach.call(component.children, (child) => {
component.removeChild(child);
});
});
const content = document.createElement('div');
ReactDOM.render(<MediaContainer locale={locale} components={reactComponents} />, content);