Skip to content

Commit 2daca1a

Browse files
claudejustin808
authored andcommitted
Remove pro_warning_badge from generate_store_script
Remove the call to pro_warning_badge_if_needed in the generate_store_script method and simplify the handling of the result from disable_pro_render_options_if_not_licensed. The method now: - Directly assigns the result without extracting sub-hashes - Returns the store hydration scripts without the warning badge This continues the removal of the visual warning badge for pro-only features.
1 parent bbc2de3 commit 2daca1a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/react_on_rails/pro_helper.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ def generate_component_script(render_options)
3838
# Generates the complete store hydration script tag.
3939
# Handles both immediate hydration (Pro feature) and standard cases.
4040
def generate_store_script(redux_store_data)
41-
pro_options_check_result = ReactOnRails::ProUtils.disable_pro_render_options_if_not_licensed(redux_store_data)
42-
redux_store_data = pro_options_check_result[:raw_options]
43-
explicitly_disabled_pro_options = pro_options_check_result[:explicitly_disabled_pro_options]
41+
redux_store_data = ReactOnRails::ProUtils.disable_pro_render_options_if_not_licensed(redux_store_data)
4442

4543
store_hydration_data = content_tag(:script,
4644
json_safe_and_pretty(redux_store_data[:props]).html_safe,
@@ -62,8 +60,7 @@ def generate_store_script(redux_store_data)
6260
store_hydration_data
6361
end
6462

65-
pro_warning_badge = pro_warning_badge_if_needed(explicitly_disabled_pro_options)
66-
"#{pro_warning_badge}\n#{store_hydration_scripts}".html_safe
63+
store_hydration_scripts.html_safe
6764
end
6865

6966
end

0 commit comments

Comments
 (0)