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:
parent
9ee9cb549b
commit
4fb94c758e
5 changed files with 28 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue