Remove duplicate react helper method definitions (#24700)

lolsob-rspec
Matt Jankowski 2023-04-28 00:35:25 -04:00 committed by GitHub
parent b2aaf92409
commit 3104805285
1 changed files with 0 additions and 12 deletions

View File

@ -155,18 +155,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 react_admin_component(name, props = {})
content_tag(:div, nil, data: { 'admin-component': name.to_s.camelcase, props: Oj.dump({ locale: I18n.locale }.merge(props)) })
end
def body_classes
output = body_class_string.split
output << "theme-#{current_theme.parameterize}"