Skip to content

Commit

Permalink
use "hook_position" instead of "hook_positions"
Browse files Browse the repository at this point in the history
match the name of the enum
  • Loading branch information
masenf committed Dec 13, 2024
1 parent f31c6c1 commit fb4d22a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ export function {{tag_name}} () {
{{ hook }}
{% endfor %}

{% for hook, data in component._get_all_hooks().items() if not data.position or data.position == const.hook_positions.PRE_TRIGGER %}
{% for hook, data in component._get_all_hooks().items() if not data.position or data.position == const.hook_position.PRE_TRIGGER %}
{{ hook }}
{% endfor %}

{% for hook in memo_trigger_hooks %}
{{ hook }}
{% endfor %}

{% for hook,data in component._get_all_hooks().items() if data.position and data.position == const.hook_positions.POST_TRIGGER %}
{% for hook, data in component._get_all_hooks().items() if data.position and data.position == const.hook_position.POST_TRIGGER %}
{{ hook }}
{% endfor %}

Expand Down
2 changes: 1 addition & 1 deletion reflex/compiler/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self) -> None:
"on_load_internal": constants.CompileVars.ON_LOAD_INTERNAL,
"update_vars_internal": constants.CompileVars.UPDATE_VARS_INTERNAL,
"frontend_exception_state": constants.CompileVars.FRONTEND_EXCEPTION_STATE_FULL,
"hook_positions": constants.Hooks.HookPosition,
"hook_position": constants.Hooks.HookPosition,
}


Expand Down

0 comments on commit fb4d22a

Please sign in to comment.