Updated react.html.haml to not preload home_timeline, notifications if no current_user

• Updated:
- react.html.haml to not preload home_timeline, notifications if no current_user
This commit is contained in:
mgabdev 2020-07-10 15:18:38 -05:00
parent 73b68373a1
commit 952e052321

View File

@ -1,6 +1,7 @@
- content_for :header_tags do - content_for :header_tags do
= preload_link_tag asset_pack_path('features/home_timeline.js'), crossorigin: 'anonymous' - if @current_user
= preload_link_tag asset_pack_path('features/notifications.js'), crossorigin: 'anonymous' = preload_link_tag asset_pack_path('features/home_timeline.js'), crossorigin: 'anonymous'
= preload_link_tag asset_pack_path('features/notifications.js'), crossorigin: 'anonymous'
%meta{name: 'applicationServerKey', content: Rails.configuration.x.vapid_public_key} %meta{name: 'applicationServerKey', content: Rails.configuration.x.vapid_public_key}
%script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json) %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)