mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-22 22:19:32 +00:00
Remove duplicate react helper method definitions (#24700)
This commit is contained in:
parent
8e514b1965
commit
ece38b9318
|
@ -155,18 +155,6 @@ module ApplicationHelper
|
||||||
tag(:meta, content: content, property: property)
|
tag(:meta, content: content, property: property)
|
||||||
end
|
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
|
def body_classes
|
||||||
output = body_class_string.split
|
output = body_class_string.split
|
||||||
output << "theme-#{current_theme.parameterize}"
|
output << "theme-#{current_theme.parameterize}"
|
||||||
|
|
Loading…
Reference in a new issue