about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/home_helper.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb
index 23de56ac6..d08264e1e 100644
--- a/app/helpers/home_helper.rb
+++ b/app/helpers/home_helper.rb
@@ -1,2 +1,14 @@
 module HomeHelper
+  def default_props
+    {
+      token: @token,
+
+      account: render(file: 'api/accounts/show', locals: { account: current_user.account }, formats: :json),
+
+      timelines: {
+        home: render(file: 'api/statuses/home', locals: { statuses: @home }, formats: :json),
+        mentions: render(file: 'api/statuses/mentions', locals: { statuses: @mentions }, formats: :json)
+      }
+    }
+  end
 end