about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-10-14 20:55:16 +0200
committerClaire <claire.github-309c@sitedethib.com>2021-10-14 21:44:57 +0200
commit694c073d1f94a54a0ccf19299e06f1de849c6edb (patch)
tree77e9855f70000396b8a6b793ac8a8dbb61c82783 /app/helpers
parentebf2c3195615bb524f6908e84f99887c8775cbc3 (diff)
parent9b978872cc1a86c7d82afda4060c909dc7ca2536 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `app/controllers/admin/dashboard_controller.rb`:
  Upstream completely redesigned the admin dashboard.
  glitch-soc tracked extra features, but that list is
  gone.
  Followed upstram.
- `app/views/admin/dashboard/index.html.haml`
  Upstream completely redesigned the admin dashboard.
  glitch-soc tracked extra features, but that list is
  gone.
  Followed upstram.
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index cc622478d..3fbc418cb 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -137,6 +137,10 @@ module ApplicationHelper
     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_classes || '').split(' ')
     output << "flavour-#{current_flavour.parameterize}"