about summary refs log tree commit diff
path: root/app/views/home/index.html.haml
blob: b4e935041e488fad298f6e98c302dbcfffc616ac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
- content_for :header_tags do
  :javascript
    window.INITIAL_STATE = {
      "meta": {
        "access_token": "#{@token}",
        "locale": "#{I18n.locale}",
        "me": #{current_account.id}
      },

      "compose": {
        "me": #{current_account.id},
        "private": #{current_account.locked?}
      },

      "accounts": {
        #{current_account.id}: #{render(file: 'api/v1/accounts/show', locals: { account: current_user.account }, formats: :json)}
      }
    };

  = javascript_include_tag 'application'

= react_component 'Mastodon', default_props, class: 'app-holder', prerender: false