Attempting to remove packs/public (check)

Attempting to remove packs/public but running into issues with webpacker when removing main() in public.js

Deleting this unused main() [the import of MediaContainer] or MediaContainer or the Poll import in MediaContainer causes this error.
Commenting out or putting return; works fine. but cannot delete that import or reactComponents variable for some reason.
This commit is contained in:
mgabdev
2020-06-15 11:06:53 -04:00
parent 8730566b27
commit b2544734c7
6 changed files with 16 additions and 338 deletions

View File

@@ -85,14 +85,6 @@ module ApplicationHelper
tag(:meta, content: content, property: property)
end
def react_component(name, props = {}, &block)
if block.nil?
content_tag(:div, nil, data: { component: name.to_s.camelcase, props: Oj.dump(props) })
else
content_tag(:div, data: { component: name.to_s.camelcase, props: Oj.dump(props) }, &block)
end
end
def body_classes
output = (@body_classes || '').split(' ')
output << "theme-#{current_theme.parameterize}"