Browse Source

[Glitch] Add attachment list fallback to public pages

Port JS changes from 4fb94c758e to glitch-soc
closed-social-glitch-2
Thibaut Girka 5 years ago
parent
commit
278ff1318f
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      app/javascript/flavours/glitch/packs/public.js

+ 6
- 0
app/javascript/flavours/glitch/packs/public.js View File

@ -61,6 +61,12 @@ function main() {
if (reactComponents.length > 0) {
import(/* webpackChunkName: "containers/media_container" */ 'flavours/glitch/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…
Cancel
Save