[Glitch] Add attachment list fallback to public pages
Port JS changes from 4fb94c758e3bf2e1c0525e9075c2d5dedc14c666 to glitch-soc
This commit is contained in:
		
							parent
							
								
									eff1c94744
								
							
						
					
					
						commit
						278ff1318f
					
				@ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user